Prime minister John Major rushed out the news the Queen had agreed to pay income tax to deflect growing media criticism during her "annus horribilis", in 1992, according to newly released official files.

The year was marked by the very public breakdowns of the marriages of Charles and Diana and the Duke and Duchess of York as well as the divorce of the Princess Royal and her first husband Captain Mark Phillips.

The final blow came when a fire caused extensive damage to Windsor Castle, prompting an outcry when it was suggested that the estimated £60 million repair bill should be met by the taxpayer.

With the royal family under scrutiny as never before, files released by the National Archives at Kew, west London, show the growing concern among ministers at the effect the "intrusive and intolerable" media coverage was having.

On November 26, Mr Major finally revealed to the Cabinet the Queen, who was not subject to taxation, had asked him some months earlier to "consider arrangements by which she could pay the equivalent of income tax on her private income".

The Prince of Wales, he said, had made a similar offer in relation to his income from the Duchy of Cornwall.

A team of officials had been quietly working on the plan, and Mr Major told ministers that he had intended to make announcement in a few weeks, when the exercise was complete.

However, the cabinet minutes noted: "In the light of recent unjustified media criticism of the Queen's taxation position and after discussion with Her Majesty, he had decided to tell Parliament later that day that these discussions were taking place and also that the Queen proposed to take on some Civil List payments."

In the discussion that followed, ministers agreed the move was "most welcome" and should put a stop to one of the major sources of criticism of the royal family.

The minutes added: "On the other hand, this gesture would not by itself change the behaviour of the media and some would represent it as resulting from their pressure.

"The Government should reinforce the Queen's initiative by strong expressions of support for the institution of the monarchy."