Conservative Mayor of London Boris Johnson has said he has decided "after a huge amount of heartache" to campaign for Britain to leave the EU.
He said the EU was eroding British sovereignty and PM David Cameron's reform deal would not bring about the fundamental change that was needed.
His decision pits him against Mr Cameron, who says Britain will be "safer and stronger" within the EU.
The prime minister says leaving the EU would be a "leap in the dark".
The announcement by Mr Johnson, who many believe has ambitions to lead the Conservative party, follows intense speculation about which side he would back.
BBC political editor Laura Kuenssberg said Mr Johnson's decision would be seen as a huge boost to the Out campaign and a major blow to the prime minister, who had hoped to persuade friends and rivals to back the campaign to remain.
She said Mr Johnson, MP for Uxbridge and South Ruislip, informed Mr Cameron of his decision by text message shortly before making it public.
Addressing reporters outside his home in north London, Mr Johnson said the EU was a "political project" that was in "real danger of getting out of proper democratic control".
He said UK sovereignty - the power of Britain to govern itself - was being "very greatly eroded" by EU institutions, with "too much judicial activism" and legislation coming out of the EU.
Mr Johnson praised the prime minister for the deal he negotiated with EU leaders to reform Britain's relationship with the EU, saying Mr Cameron had done "fantastically well" in a short space of time.
"But I don't think anybody could realistically claim this is fundamental reform of the EU or of Britain's relationship with the EU," he said.
The MP added: "It's my view... we have a chance actually to do something. I have a chance to do something," to create a new relationship with the EU based more on "trade and co-operation".
"I want a better deal for the people of this country, to save them money and to take back control," he said.
Mr Johnson denied his decision had anything to do with leadership ambitions, stressing that he made up his mind "after a huge amount of heartache" and the last thing he wanted to do was defy Mr Cameron.
He said he would be backing the Vote Leave campaign - one of two groups seeking the official designation - but ruled out taking part in TV debates against members of his party.
'Safer and stronger'
Mr Cameron had earlier issued a last-ditch plea to Mr Johnson to back staying in the EU.
He said if Mr Johnson cared about "getting things done" in the world, being a member of the EU was key.
And, he added, "linking arms" with Nigel Farage and George Galloway - part of the Grassroots Out movement which is also vying to become the official Leave campaign - was "taking a leap into the dark and is the wrong step for our country".
Mr Cameron argued that the UK is "better, safer and stronger" being in the EU.
And he said that withdrawing from the 28-member bloc might give the "illusion of sovereignty" but would actually weaken the UK's power and influence.
However, his argument for remaining in the union was not enough to convince Mr Johnson, who joins six ministers who attend cabinet in backing the campaign to leave.
Mr Johnson's decision drew criticism from former Conservative deputy prime minister Lord Heseltine, who called it "illogical".
"If it takes you this long to make up your mind about something so fundamental and you still have questions, then surely the right option is to stay with what you know rather than risk our economy and security with a leap in the dark," he said.
Among the cabinet members backing the Out campaign are Work and Pensions Secretary Iain Duncan Smith and Justice Secretary Michael Gove.
Zac Goldsmith, who is hoping to become Mr Johnson's successor as a Conservative London mayor in May, has also said he will vote to leave.