A cross-party charter on the regulation of Britain's pugnacious newspapers agreed in the wake of the phone-hacking scandal was given royal approval on Wednesday, despite a last-minute legal challenge by the industry.
Newspapers had asked judges for an urgent injunction to prevent government ministers from seeking approval from Queen Elizabeth II for the so-called royal charter.
The formal document has the backing of the three main political parties, but many editors warn it will allow governments to erode press freedom.
They argued at the High Court in London on Wednesday morning that the industry's own rival proposals for a royal charter had not been given adequate consideration.
Senior judges rejected their arguments as "at best weak", prompting an emergency appeal later in the day to the Court of Appeal.
But this also failed, clearing the way for the queen — through her advisory body the Privy Council — to set her seal on the charter.
The charter establishes a new "recognition body" intended to oversee a powerful new regulator set up by the newspaper industry.
The government argues that it offers the best way forward for the industry while stopping short of full statutory regulation.
Many newspapers and magazines are strongly opposed to it, believing there should be no involvement by politicians in the regulation of the press, which is currently self-regulated.
After the charter received the queen's approval, a government spokesman said: "The question that remains is how it will work in practice.
"We will continue to work with the industry, as we always have."
In the wake of the phone-hacking scandal at the Rupert Murdoch-owned News of the World, a public inquiry led by a senior judge looked at the ethics of the British press.
Following the Leveson Inquiry's conclusions, newspapers and politicians drew up rival charters to deal with a new system of regulating the press.
Both charters propose a recognition panel to oversee a self-regulation committee with powers to levy fines of up to £1 million ($1.6 million, 1.2 million euros) on newspapers that break the rules.
But while the charter put forward by the press would require approval across the industry for any changes, the politicians' charter could be changed by a two-thirds majority in a parliamentary vote.
Under an amendment introduced on Wednesday, any change to the politician-backed charter would also require the unanimous agreement of the board of the recognition panel.
By coincidence, the charter was approved as the prosecution case opened in the trial of key figures at the News of the World, including key Murdoch aide and former editor Rebekah Brooks.