Pressure from the royal family led government ministers to enforce a blanket ban on the disclosure of Prince Charles's lobbying campaigns, it has been claimed.

Royal aides successfully pressed the government to tighten up the Freedom of Information Act to ensure that in the future, there is no chance his lobbying will be made public under the legislation for 20 years or five years after his death, whichever is longer.

The royals had felt "very strongly" that the act was too weak and demanded extra protection to conceal Charles's behind-the-scenes interventions in public affairs, according to Whitehall sources.

Details of the royal pressure have come to light as the Guardian goes to a freedom of information tribunal tomorrow in an attempt to gain access to letters the prince has written to ministers. If the Guardian wins the case, it would be the first time the government has been ordered to disclose Charles's letters under the act.

For five years ministers have resisted the Guardian's freedom of information request for a set of the prince's letters from 2004 and 2005. The coalition government is spending in the region of £75,000 on barristers to win the tribunal. The prince has been regularly accused for "meddling" in the affairs of governments by sending a barrage of letters to ministers. The letters containing his strongly-held views have been dubbed "black spider memos" because of his handwriting.

Charles has been accused of using his privileged position over the last four decades to influence government policies on subjects as diverse as the Human Rights Act, hunting and alternative medicine.

A senior Ministry of Justice source said the "Palace had been uncomfortable for some time" about the Freedom of Information Act after it came into force in 2005 and began "expressing their concerns to civil servants".

Under the act, the public has a chance of viewing Charles' letters if their disclosure can be shown to be in the public interest. Although none has been disclosed so far, there has been a possibility that they could be released if it can be proved that the prince had directly affected government policy.

An opportunity for the prince to do something about this came last year when Daily Mail editor Paul Dacre – heading a committee appointed by the then prime minister Gordon Brown – recommended that old government records should be released after 15 years, instead of the traditional 30. This change would have required legislation in order to be implemented. The ministry source said: "Paul Dacre had some sort of vague words that if it was brought down to 15 years, some other changes might need to be made in the act. The civil service spot these kind of sub-clauses in a massive report, one little sub-clause, [and] see the opportunity to pore through it."

After many arguments within Whitehall, a deal was struck: the secrecy surrounding old government records would be liberalised so that they could be made public earlier than before, but at the same time there would be a block on the disclosure of correspondence between the government and the monarch, the heir to the throne or the next in line, regardless of the public interest.

The gag would apply for 20 years, or five years after the death of the royal in question, whichever was longer. The proposal – inserted into a larger bill about constitutional reform – was rushed through parliament with minimal debate in the dying days of the last government, after the general election was called.

Then justice minister Jack Straw told MPs there had been an error in the drafting of the original act. Then Labour MP Tony Wright called it the "Prince Charles amendment".

A royal spokeswoman said: "The royal household was consulted by government on the changes to the freedom of information act, but, as with all official matters, the royal household relied on the advice of Her Majesty's ministers with regards to the issue."

The block is not yet in force and so does not rule out the Guardian's request, which is being considered by this week's tribunal.

The royals and their supporters argue that Charles' letters should not be made public because he has the right to be educated in the business of government before he ascends to the throne, andwhich this allows him to make his views known to ministers and debate with them.

According to constitutional convention, they say, the monarch and heir have a duty and right to "counsel, encourage and warn" his or her government in complete confidentiality so that his or her political neutrality is not, or does not appear to be, compromised.

The Guardian argues that the public should be allowed to know whether the prince has been secretly influencing the government.

Publication of the letters would enable the public to judge if he is interfering too much and if ministers have been giving too much weight to his views, says the Guardian.

This week's tribunal in central London will decide whether to release Charles's correspondence with ministers in seven Whitehall departments between September 2004 and April 2005. They are the Cabinet Office, departments of business, health, schools, environment, culture and Northern Ireland.