Britain's three main political parties have agreed to create a new system to regulate the country's newspapers.

It comes after a public inquiry exposed a culture of industrial-scale phone hacking and other unethical behaviour.

The deal will establish a new press regulator and introduce fines of up to £1m (€1.2m).

There will also be an obligation on newspapers to print prominent apologies where appropriate.

The system will be voluntary, but there will be strong financial incentives to encourage newspapers to opt into it.

"What we have today, which is a good thing, is a cross-party agreement," said a spokesman for British Prime Minister David Cameron.

"It will put in place a strong system of independent regulation of the press."

The government came under pressure to create a new regulatory system after the judge-led Leveson inquiry and a series of arrests laid bare a disturbing culture of phone hacking and malpractice in some parts of the press.

However, concerns that any deal would imperil press freedom delayed agreement.

Some press barons threatened to boycott a new regulatory regime, while campaigners for tougher regulation accused Mr Cameron of being in thrall to the press.

The deal spares the prime minister what was shaping up to be an embarrassing political defeat in parliament that would have deepened rifts in his coalition government.

Compromise deal

The Conservatives, Labour and the Liberal Democrats had been divided over whether a new press regulator should be enshrined in law and over how its members would be chosen.

They reached a compromise after agreeing to enact legislation to ensure the new system cannot be easily altered later.

Mr Cameron said he was satisfied with the outcome.

"What we wanted to avoid, and what we have avoided, is a press law," he told BBC TV.

Leader of the opposition Labour party, Ed Miliband, said the compromise struck the right balance.

"I genuinely believe it upholds the freedom of the press and also meets the terms that the victims (of phone hacking) have set out," he said.

Others were less happy.

Index on Censorship, a group that campaigns for free speech, said it was a "sad day for press freedom in the UK".

"The involvement of politicians undermines the fundamental principle that the press holds politicians to account," said Kirsty Hughes, its CEO.

"Politicians have now stepped in as ringmaster and our democracy is tarnished as a result."

Hacked Off, a group representing the victims of newspaper behaviour, welcomed the agreement, saying it did enough to protect the public from press abuses.