A deal has been struck between the three main political parties on regulating the press in England and Wales after the phone-hacking scandal.
An independent regulator will be set up by royal charter, but views vary over whether it would be underpinned by law.
Labour leader Ed Miliband and Deputy Prime Minister Nick Clegg said this would be the case, but the prime minister denied it.
Press reform campaign group Hacked Off has welcomed the deal.
Prime Minister David Cameron is to apply for an emergency debate in the House of Commons later.
The overhaul of press regulation began after it emerged that journalists had hacked thousands of phones.
Lord Justice Leveson's subsequent inquiry into press ethics called for a new, independent regulator backed by legislation designed to assess whether it is doing its job properly, which prompted months of political wrangling.
The Liberal Democrats and Labour wanted a royal charter - a formal document used to set up bodies such as universities and the BBC - backed by legislation, while Mr Cameron supported a royal charter without a law.
Early on Monday a deal was struck, under which a clause in the Enterprise and Regulatory Reform Bill would be tabled in the Lords.
This would state that a royal charter cannot be changed unless it meets requirements stated within that charter for amendments.
It does not mention any specific charter, Leveson or the press - but the royal charter on press regulation would itself state that it cannot be amended without a two-thirds majority of Parliament.
Both sides have differed in their interpretation of whether this deal involves a new law.
Mr Cameron and the Culture Secretary, Maria Miller, both said there was no statutory underpinning.
"What we wanted to avoid, and we have avoided, is a press law," Mr Cameron said.
"Nowhere will it say what this body is, what it does, what it can't do, what the press can and can't do. That, quite rightly, is being kept out of Parliament. So, no statutory underpinning but a safeguard that says politicians can't in future fiddle with this arrangement."
However, Mr Miliband said the royal charter "would be underpinned by statute".
He said this was important because "it stops ministers or the press meddling with it, or watering it down in the future".
Details of the royal charter have not been published yet, but from two separate drafts - one published by the government and one jointly published by the Lib Dems and Labour - the regulator is likely to be able to force a newspaper to issue corrections and apologies, and could also have the power to impose fines.
It would not give the press a veto over appointments to a new regulator, the prime minister's spokesman said.
Describing the regulator as having teeth to punish, Mr Miliband said: "A free press has nothing to fear from what has been agreed".
Mr Clegg said he had worked "flat out" to get the deal, and was "delighted" with the cross-party agreement.
To anyone outside Westminster this must all sound
like not so much a dance, but more like an
enthusiastic disco on the head of a pin.
It boils down to how to set up a new system for
regulating the newspapers that is respected, but not
seen to be a law that undermines the freedom of
After months of talks and hours before a crunch
Commons vote, a few buckets of midnight oil were
burnt to bring the political parties very close to a deal.
It sounds as though David Cameron, Ed Miliband and
Nick Clegg barely managed eight hours sleep between them.
All three party leaders say the deal is a triumph:
for victims of the press, freedom of the press and...
There is a political battle under way over the ownership
of the deal and a political battle under way over the
language to describe it.
The prime minister is categoric. The royal charter that
will oversee the new regulator will not be underpinned
Labour leader Ed Miliband is categoric too. He says
"It is simply a clause that says politicians can't fiddle
with this," says David Cameron.
"This is not a little bit of statute, this is not a dab
of statute, this is statute pure and simple," a source
close to Mr Miliband told me.
So when is statutory underpinning not statutory
underpinning? That disco has begun.
"We've secured the cherished principle of freedom of the press, which is incredibly important in our democracy, but also given innocent people the reassurance that we won't be unjustifiably bullied or intimidated by powerful interests in the press without having proper recourse when that happens."
One newspaper industry source told the BBC they were "instinctively uncomfortable" with news of the deal.
The source noted that there was no compulsion for the papers to be involved in the new system - they could carry on setting up a new regulator to replace the much-criticised Press Complaints Commission but decide that the regulator should not apply for official recognition.
The Sun's associate editor Trevor Kavanagh said it remained unclear what the details of the new regulatory regime were.
The Sun and others have said they will accept everything recommended by Lord Justice Leveson - except statutory legislation.
"The newspaper industry has gone a very long to meet the requirements of the public and politicians to clean up its act," Mr Kavanagh added.
BBC political editor Nick Robinson said the press had been informed over the days and months of wrangling, with key players being Telegraph's Lord Black, Associated Newspapers' Peter Wright, the editor of the Times John Witherow and the editor of the FT Lionel Barber.
Evan Harris of campaign group Hacked Off was at the overnight talks, with three other members. The group later said it believed the deal "can effectively deliver" Lord Justice Leveson's recommendations.
It said a free arbitration service would be offered to people who felt they had been the victims of press abuse.
The idea of a charter was criticised by free speech campaign group Index on Censorship. Chief executive Kirsty Hughes said the decision was a "sad day for press freedom in the UK".
She said: "Index is against the introduction of a royal charter that determines the details of establishing a press regulator in the UK - the involvement of politicians undermines the fundamental principle that the press holds politicians to account."