Image caption Prince Charles' letters were sent between September 2004 and April 2005

Attorney General Dominic Grieve has blocked the release of private letters the Prince of Wales sent to seven government departments.

A court ruled last month that the correspondence should be published.

But Mr Grieve said it was an exceptional case where the letters formed part of the prince's "preparations for kingship".

The Guardian said it would seek to take the government to the High Court to challenge the veto .

The Republic group called the ruling an "affront to democracy" which was "all about protecting Charles and the Royal Family from scrutiny".

'Practical benefit'

In his report, Mr Grieve said: "The ability of the Monarch to engage with the government of the day, whatever its political colour, and maintain political neutrality is a cornerstone of the UK's constitutional framework."

The Administrative Appeals Chamber said last month that in its view, it was in the public interest "for there to be transparency as to how and when Prince Charles seeks to influence government".

Analysis Prince Charles and his officials will be relieved the government has come to the aid of the future king. One day of partially submerged headlines - the announcement has been made on a particularly busy news day - is preferable to several days devoted to the prince's thinking and style of writing. The 27 letters, we now know from the attorney general, are "particularly frank" and if published would "potentially have undermined his position of political neutrality". This is enough for his critics to once again accuse the heir to the throne of meddling behind the scenes. He is, after all, the royal a former senior aide once described as a "dissident" working against "current political opinion". Those around Charles insist he mobilises, rather than meddles; he's entitled to contact ministers in private; and his way of operating will change once he ascends to the throne.

The case arose from a Freedom of Information request submitted by Guardian journalist Rob Evans.

Mr Evans wanted to see letters between Prince Charles and the Department for Business, Innovation and Skills, the Department of Health, the Department for Children, Schools and Families (which is now the Department for Education), the Department for Environment, Food and Rural Affairs, the Department for Culture, Media and Sport, the Northern Ireland Office and the Cabinet Office.

The information commissioner had denied the request, but the Administrative Appeals Chamber said the commissioner had given "insufficient weight to the public interest".

It ruled that 27 out of 30 items of correspondence, which it deemed to be "advocacy correspondence" should be published.

But the attorney general has used his powers to veto publication in exceptional cases, saying he had reached his decision having "taken account of the views of the cabinet, former ministers and the information commissioner".

He said that "in my view it is of very considerable practical benefit to the Prince of Wales' preparations for kingship that he should engage in correspondence and engage in dialogue with ministers about matters falling within the business of their departments."

"Discussing matters of policy with ministers and urging views upon them falls within the ambit of 'advising' or 'warning' about the government's actions."

'Particularly frank'

He said that, unlike the appeal court, he thought that the correspondence was part of Prince Charles' preparation for kingship so his attempts to influence policy could not be likened to that of any other lobbyist.

He accepted the argument that publication would help increase public "understanding of the influence of the Prince of Wales on matters of public policy" and inform the "broader debate surrounding constitutional reform".

ATTORNEY GENERAL'S RULING Under the "tripartite convention", the monarch has right, and duty, to "be consulted, to encourage and to warn the government"

This ensures a "measure of influence" is retained for the monarch within the constitution

Under the "education convention", the heir to the throne has the right to be instructed in the business of government

"Advocacy correspondence" allows the Prince of Wales to understand the business of government and strengthen links with ministers, ahead of becoming monarch

Without confidentiality, ministers and the prince will feel inhibited in exchanging views

There is a risk that, if the prince is seen as disagreeing with government policy, it will damage his position of political neutrality

"However, if they were decisive in the present case it would have to be at the expense of the strong public interest arguments against disclosure, centred upon the Prince of Wales' preparation for kingship and the importance of not undermining his future role as Sovereign."

Mr Grieve said there was nothing improper in the nature or contents of the letters but that they reflected the prince's "most deeply held personal views and beliefs" and were in "many cases particularly frank".

"They also contain remarks about public affairs which would in my view, if revealed, have had a material effect upon the willingness of the government to engage in correspondence with the Prince of Wales and would potentially have undermined his position of political neutrality."

On its website, the Guardian said it "would be seeking to take the government to the High Court to challenge the veto on the grounds that it had acted unreasonably".

It added: "The prince has for some years been accused of meddling in government affairs and seeking to influence ministers to alter policy."

Graham Smith, chief executive of the Republic group, said: "It's an open secret that Prince Charles lobbies the government. What the public has a right to know is what he is lobbying for and whether he is actually influencing policy.

"This decision is a serious affront to British democracy and must be challenged."

A Clarence House spokeswoman declined to comment.