Downing Street has begun the "preparatory work" needed for the release of letters written by the Prince of Wales to government ministers following a decision by the Supreme Court to uphold a ruling which paved the way for their publication.

A Number 10 spokeswoman, who was unable to give any timetable for disclosure of the letters, said that following the judgment by the UK's highest court "we will now need to undertake the preparatory work to determine how best to release the correspondence".

She said: "The preparatory work we are dong is to look at what information we release and the best way to do that."

Both Clarence House and the Prime Minister expressed disappointment after the Supreme Court dismissed a challenge by the Attorney General, the Government's principal legal adviser, against a decision by the Court of Appeal last year that he had unlawfully prevented the public seeing the royal correspondence.

A spokeswoman for the Prince said after today's ruling: "This is a matter for the Government. Clarence House is disappointed the principle of privacy has not been upheld."

Prime Minister David Cameron said: "This is a disappointing judgment and we will now consider how to release these letters. This is about the principle that senior members of the Royal Family are able to express their views to government confidentially. I think most people would agree this is fair enough.

"Our FOI (Freedom of Information) laws specifically include the option of a governmental veto, which we exercised in this case for a reason. If the legislation does not make Parliament's intentions for the veto clear enough, then we will need to make it clearer."

The case - which is believed to mark the first time that anyone has challenged the Attorney General's powers to block access to information - went to the Supreme Court after appeal judges unanimously ruled that he had "no good reason" for using his ministerial veto and overriding the decision of an independent tribunal, chaired by a High Court judge, in favour of disclosure of the letters.

The latest ruling in the long-running dispute over disclosure of the letters is a blow for Charles. Sent to seven government departments, the frank notes penned between September 2004 and March 2005 reflect, according to previous attorney general Dominic Grieve, the Prince's "most deeply held personal views and beliefs".

Charles has long been accused of "bombarding" ministers with "black spider" memos attacking government policy. His letters are so-named after his distinctive handwriting and abundant use of underlining and exclamation marks.

In 2005 Guardian journalist Rob Evans applied to see a number of written communications between Charles and various government ministers, seeking disclosure under the Freedom of Information Act 2000 (FOIA) and under the Environmental Information Regulations 2004.

The Upper Tribunal (UT) declared in September 2012 that he was entitled to see "advocacy correspondence", described as letters the Prince had written seeking to advance the work of charities or to promote views. It decided that the Government was required to disclose 27 out of the 30 requested items of correspondence.

A month after that ruling, the Attorney General used his ministerial veto by issuing a certificate under Section 53 of the FOIA. Mr Evans accused him of failing to show "reasonable grounds" for blocking disclosure.

By a majority of five to two, the Supreme Court said it considered the Attorney General was not entitled to issue a certificate under Section 53 "in the manner that he did", ruling that the certificate was "invalid".

Supreme Court president Lord Neuberger said there was a "fundamental composite principle" behind the court's reasons for dismissing the Attorney General's appeal.

He announced: "That principle is that a decision of a judicial body should be final and binding and should not be capable of being overturned by a member of the executive."

Lord Neuberger concluded that Section 53 does not permit the Attorney General to override a decision of a judicial tribunal or court by issuing a certificate "merely because he, a member of the executive, considering the same facts and arguments, takes a different view from that taken by the tribunal or court".

This would be, he found, "unique in the laws of the United Kingdom".

Alan Rusbridger, editor-in-chief of Guardian News & Media, said: "We are delighted the Supreme Court has overwhelmingly backed the brilliant 10-year campaign by Guardian reporter Rob Evans to shine daylight on the letters Prince Charles has been writing to ministers.

"The Government wasted hundreds of thousands of pounds trying to cover up these letters, admitting their publication would 'seriously damage' perceptions of the Prince's political neutrality. Now they must publish them so that the public can make their own judgment.

"This is a good day for transparency in government and shows how essential it is to have a fully independent judiciary and free press."

Republic welcomed the Supreme Court decision and called for the law to change so future requests for disclosure would be successful.

Graham Smith, chief executive officer of Republic, said: "This is excellent news. The Government must now act to end royal secrecy. Any risk to the monarchy must pale against a risk to democracy from having an activist prince acting in secret.

"We can't have a situation where we don't know what influence Charles is having on government policy.

"The changes made to FOI laws in 2010 must be reversed so future requests for disclosure can be successful."

Information Commissioner Christopher Graham said: "This is a welcome decision, offering greater clarity on a law that, just 10 years on from its implementation, is still in its relative infancy.

"The ICO will, of course, study the judgment very carefully and consider its implications, which appear to be far-reaching, particularly around environmental information."

The Attorney General had acknowledged that the Section 53 power should be exercised only in exceptional cases, but said he was satisfied that the case relating to the Prince's letters was such an exceptional case.

His reasons included the fact that the information in question consisted of "private and confidential" letters between Charles and ministers, the fact that they "formed part" of his "preparation for kingship" and "the potential damage" that disclosure would do to the principle of his political neutrality "which could seriously undermine the Prince's ability to fulfil his duties when he becomes King".

Mr Evans originally lost his case in the High Court, but Master of the Rolls Lord Dyson, Lord Justice Richards and Lord Justice Pitchford all agreed at the Court of Appeal that the Attorney General had gone wrong in law and the Section 53 certificate should be quashed.

The seven departments Charles wrote to were Business, Innovation and Skills; Health; Children, Schools and Families; Environment, Food and Rural Affairs; Culture, Media and Sport; the Northern Ireland Office and the Cabinet Office.

The court's ruling was welcomed by the Campaign for Freedom of Information director, Maurice Frankel.

"This is a critical decision which strengthens the FOI Act. It says the courts not ministers normally have the last word," he said.

"If the Government disagrees with a ruling on good grounds it should appeal. The veto is not a trump card to be slipped out of a minister's sleeve to block any embarrassing disclosure. Ministers will now have to argue their case not impose it."