The Queen never faced a major constitutional crisis to match that sparked by Edward VIII’s abdication, but she did have her fair share of difficulties.
Her reign spanned many British governments under 15 prime ministers and dozens more in the Commonwealth.
She received weekly briefings from the prime minister of the day and dozens of Government documents passed across her desk every week for formal approval.
As the years wore on she was able to offer advice – and occasionally caution – to a succession of politicians at home and abroad.
Constitutional expert and former MP Sir Robert Rhodes James told the Royal Society of Arts in 1993 how all the prime ministers who served the Queen spoke of their admiration for her deep political knowledge and shrewdness.
“Her political experience, in itself, is far greater than any member of the present Government or Opposition,” he said.
“She is the best-informed person on national and international matters and personalities in the world.
“The cliche that knowledge is power is, like most cliches, true – but it does not include the power to make or unmake ministries.”
The Queen’s political experience was indeed immense and, at times, she needed all of it.
The first major tests both came about because the post-war Conservative Party had no formal rules for electing a leader, forcing her to use her royal prerogative to appoint a prime minister on two occasions.
On Sir Winston Churchill’s retirement in 1955, the mantle passed to his long-time heir-apparent Sir Anthony Eden, who moved into 10 Downing Street.
When Sir Anthony left in 1957, in the wake of the Suez Crisis, there were two possible successors, Harold Macmillan and RA Butler.
The Queen consulted Eden, Churchill and two cabinet ministers, Lord Salisbury and Lord Kilmuir, who were not eligible because they were peers.
They took soundings in cabinet and from party whips, and all the combined advice offered to the Queen pointed to Macmillan.
The press, however, had widely expected Butler, acting prime minister during Eden’s illness, to succeed and were astonished when he was not called to the palace.
But it was Macmillan’s departure in 1963 that was to cause the biggest controversy.
The Queen visited her ailing prime minister in hospital and was told that a wide canvass of party opinion had convinced him that Lord Home should be his successor.
That effectively prevented the Queen from taking wider soundings – a failure which was to drag her into an ugly political squabble as it emerged that Macmillan appeared to have at least partially “fixed” the succession.
The row led the Tories to follow Labour’s lead and establish a selection procedure so that the Queen would never again be placed in such an awkward position.
But on occasions her representatives in the Commonwealth seemed less bothered about the consequences of taking deeply unpopular decisions in her name.
In 1975, Sir John Kerr, the Governor-General of Australia, used the power of prerogative vested in his office to dismiss prime minister Gough Whitlam over the issue of money supply.
He was perfectly within his constitutional rights to do so – and the Queen was never consulted – but the issue sparked a row which simmers to this day and might have seen Australia become a republic.
Other constitutional problems arose in some of the smaller countries of the Commonwealth.
Many MPs were enraged in 1983 by the sudden US invasion of the Caribbean island of Grenada, where the Queen was head of state.
It emerged that no attempt had been made to consult the Queen – a lack of courtesy and breach of protocol which further inflamed a delicate situation.
Then, in l987, Fiji, following a military coup, became a republic outside the Commonwealth.
This prompted the Queen to warn that anyone who sought to remove her Governor General from office “would, in effect, be repudiating his allegiance and loyalty to the Queen” and to deplore the fact that “the ending of Fijian allegiance to the Crown should have been brought about without the people of Fiji being given an opportunity to express their opinion on the proposal”.
In 2019, Prime Minister Boris Johnson dragged the Queen into a constitutional row during her summer holiday amid Westminster’s bitter Brexit battles when he asked her to suspend Parliament for more than a month.
The sovereign was duty bound to hold a Privy Council meeting at Balmoral, her private Scottish estate, where, acting on the advice of Mr Johnson, she approved an order to temporarily close – or prorogue – Parliament for five weeks.
Opposition leaders wrote to the Queen in protest and the then-Commons Speaker John Bercow said the move was a “constitutional outrage” designed to stop Parliament debating Brexit.
In the end, the Supreme Court ruled Mr Johnson’s advice to the Queen to suspend Parliament was unlawful because it had the effect of frustrating Parliament.
The Queen’s dedicated attention to her constitutional functions has been commented upon by many of her prime ministers.
Politicians quickly became aware they were best not to go to Buckingham Palace unless fully prepared.
Harold Wilson once confessed that he felt like a schoolboy who had not done his homework when the Queen cited a document which he had not read.
In the documentary Elizabeth R, filmed to mark her 40th year on the throne, the Queen, who had to remain politically neutral, gave her view of the importance of her meetings with her prime ministers.
“They unburden themselves or tell me what is going on or if they have any problems, and sometimes I can help in some way as well,” she said.
“They know I can be impartial and it is rather nice to feel one is a sponge.
“Occasionally one can put one’s point of view and perhaps they have not seen it from that angle.”
In his memoirs, James Callaghan recorded how the Queen encouraged him as Foreign Secretary in 1976, to take an initiative, which he already had in mind, to resolve the Rhodesian problem.
“Inevitably the Queen’s opinion was enough to tip the scales, for she is an authority on the Commonwealth and I respected her opinion,” he wrote.
The move failed thanks to the intransigence of Rhodesian premier Ian Smith, but Callaghan added: “I have always thought… the Queen’s initiative on Rhodesia was a perfect illustration of how and when the monarch could effectively intervene to advise and encourage her ministers from her own wide experience and with complete constitutional propriety.”
The Queen’s final meeting with a prime minister was during Tuesday’s audience with newly elected Conservative leader Liz Truss, which followed a visit from outgoing prime minister Boris Johnson as he tendered his resignation.