Boris Johnson has called on newspapers to shun the Government's proposed royal charter on press regulation.
The Mayor of London, a former journalist, said accepting the "monstrous folly" of a charter drawn up by politicians would "erode" the freedom of the press.
He also described any new measures of regulation as "absolutely pointless", adding that it was "political embarrassments" in the press that triggered the Leveson inquiry into media standards, on which the new charter is based.
Writing in the Daily Telegraph, Mr Johnson said: "We are on the verge of eroding the freedom of the press.
"We are undermining the work of everyone from John Milton to John Wilkes - men who fought for the right to say and publish things of which politicians disapproved.
"The last and most powerful point against any new regulation of papers is that it is so completely pointless. We live in a world in which vast quantities of news can be instantly disseminated across the internet, and by companies way beyond any conceivable reach of Parliament or Government."
Prime Minister David Cameron has come under pressure to push ahead with a new system of press regulation, particularly by victims of the phone-hacking scandal, as well as members of the Hacked Off campaign group - who include actor Hugh Grant.
Daily Mail editor-in-chief Paul Dacre last week said the row between Ed Miliband and his newspaper over an article about the Labour leader's late father showed why politicians should not be involved in press regulation.
Mr Johnson said it was "inevitable" that a vigorous media would cause "occasional heartache and dish out the odd uncalled-for insult".
But he said: "It strikes me that Ed Miliband was well within his rights to stick up for his father, for instance. But you can't regulate the press just because they are insulting, or subversive, or ﬁnd stories in tainted sources."
The Government and the media remain in deadlock after the industry rejected the latest proposals to establish a new system of regulation.
The Privy Council last week rejected a counter charter put forward by the media, while some editors have already categorically ruled out having anything to do with a royal charter.
Mr Johnson offered a light-hearted suggestion for those troubled by the actions of some members of the press, saying: "Who are the Privy Council, for goodness' sake? They are just a bunch of politicians, a gloriﬁed version of the government of the day.
"If you are bothered by those nasty people from the media, and they won't go away, and they continue to sit outside your house asking questions to which you have already told them the answer, may I recommend that you do as my children and I once did years ago. We imitated Eddie Murphy in Beverly Hills Cop, and we stuffed bananas secretly up the reporter's tailpipe, and I remember us laughing helplessly at her air of puzzlement as she kaboing-ed up the road.
"Far better than regulation."