London (AFP) - London's mayor Boris Johnson has thrown his weight behind the campaign for Britain to leave the European Union, in a blow for his old friend and rival Prime Minister David Cameron who had appealed for his backing.

"After a great deal of heartache... I will be advocating vote 'Leave'," Johnson said, making his long-awaited announcement to a large crowd gathered outside his home in north London.

Johnson, a popular politician from Cameron's Conservative Party who is seen as a potential successor to the British premier, said he wanted ties with Europe based on "trade and cooperation" and not "a political project".

He said Cameron had done "fantastically well" in negotiating concessions from European Union leaders at a summit last week that paves the way for a membership referendum on June 23.

But he added: "I don't think anybody could realistically claim that this is fundamental reform of the EU or of Britain's relationship with the EU".

The declaration will be seen as a key victory for supporters of a British departure from the EU -- or "Brexit".

In a column for the Daily Telegraph on Sunday, Johnson wrote that the European Union project had "morphed and grown in such a way as to be unrecognisable" and that there was nothing xenophobic in wanting to quit.

"We are seeing a slow and invisible process of legal colonisation, as the EU infiltrates just about every area of public policy," he said, adding that the vote was a once-in-a-lifetime chance to change Britain's relations with Europe.

"There is only one way to get the change we need, and that is to vote to go, because all EU history shows that they only really listen to a population when it says No," he wrote.

- 'Better off inside the EU' -

Compared to other anti-EU politicians, the mayor of London is popular even with those who do not share his political views, thanks to his witty soundbites and shambolic appearance.

"I'm really disappointed that he's backing leave because I think we should stay," said Andy Burton, 36, a director at a healthcare company who watched Johnson make his statement alongside around 70 other passers-by.

Story continues

"He's just got a real presence, he's very popular, he will sway Londoners".

The Leave.EU campaign, one of the groups advocating Brexit, welcomed Johnson's endorsement.

But Will Straw, executive director of the Britain Stronger in Europe campaign, said Johnson and other pro-Brexit politicians had "no consistency or clarity on what leaving Europe means for Britain".

Cameron had made a last-ditch appeal to the charismatic Johnson in a BBC interview earlier on Sunday.

"I would say to Boris what I say to everybody else which is we'll be safer, we'll be stronger, we'll be better off inside the EU," Cameron said.

Cameron also made clear his battle lines for the vote, warning that Britain would still have to negotiate trade ties with the EU if it left and that a departure would give an "illusion of sovereignty" and was "a leap into the dark".

- New Scottish independence vote? -

After securing a deal in Brussels late Friday aimed at preventing Britain from becoming the first country to leave the EU, Cameron flew back to London to meet his cabinet.

Six cabinet ministers have come out in favour of leaving the bloc so far, including Justice Secretary Michael Gove, one of Cameron's closest friends and allies.

The premier now faces a battle to keep his centre-right Conservatives together while convincing voters he has secured a good enough deal from Brussels for them to support continuing membership.

Cameron is due to redouble those efforts on Monday when he addresses the House of Commons.

In a move which highlighted the provisional nature of some of the Brussels deal, Cameron admitted details of an "emergency brake" limiting how much in benefits EU migrants can claim in Britain for their first four years here had yet to be worked out.

Eurosceptic cabinet ministers have already started speaking out against the deal.

Work and Pensions Secretary Iain Duncan Smith questioned how much impact the "emergency brake" would have on limiting new arrivals while suggesting that EU membership made Britain more vulnerable to the kind of jihadist attacks seen in Paris last November.

The Conservative candidate to succeed Johnson as mayor, Zac Goldsmith, has also said he will campaign for Brexit.

Scottish First Minister Nicola Sturgeon confirmed Sunday that she would back EU membership and told the BBC that any vote to leave would "almost certainly" trigger a fresh independence referendum.

Scotland backed remaining part of Britain in a referendum in 2014, despite Sturgeon's ruling Scottish National Party supporting independence.

A Survation/Mail on Sunday opinion poll, the first since the Brussels deal, indicated that 48 percent of Britons did not want to leave the EU, 33 percent did and 19 percent were still undecided.