Former Canadian high commissioner to the UK Jeremy Kinsman said this was a message the King will be pleased to deliver.

“It’s going to be very affirmative of Canadian sovereignty. And I can say personally that it’s something that King Charles will celebrate saying. I have no doubt,” said Mr Kinsman, who worked as a diplomat with the King when he was Prince of Wales.

The speech, to be delivered in French and English, will set out the Canadian government’s policy agenda in a way that is similar to the King’s Speech at the State Opening of Parliament in Westminster.

But it is also expected to have lines asserting the independence of Canada – a Commonwealth country and Nato member.

Speaking ahead of the King’s visit and State Opening, Carney said: “This is an historic honour which matches the weight of our times.”

In terms of the ceremony, the King is expected to wear a suit, in an event that will be more low key than the crown and elaborate robes on display in the UK’s opening of Parliament.

As well as the speech in Parliament, this brief trip will include community events in Ottawa and a chance to meet local leaders.

This royal visit will be something of a diplomatic balancing act. The King is head of state of both Canada and the UK – and in his UK role, the King has been helping to maintain good relations with the US, sending a warm personal letter to President Trump inviting him for a second state visit.

In Canada, he will be expected to reflect a very different message, with Canada’s government rejecting Trump’s ambition to take over the country.

Ahead of the visit, a royal source said: “The King has long experience and great skill in walking that diplomatic tightrope.

“He’s held in high regard around the globe and across the political spectrum, with good relations with world leaders who understand his unique position.”