Jean-Claude Juncker was named as the next president of the European Commission on Friday, dealing a bitter blow to Britain after David Cameron warned the EU could "live to regret" the move.
European leaders now face having to repair the relationship with Cameron after a very public row over one of the EU's top jobs ahead of a slated referendum on whether Britain should leave the EU in 2017.
Cameron forced an unprecedented vote on the issue at a high-stakes Brussels summit despite having the support of only Hungary among the other 27 EU members.
Juncker's nomination was confirmed on Twitter by Herman Van Rompuy, who heads the European Council of leaders.
"Decision made. The European Council proposes Jean-Claude Juncker as the next President of the European Commission," he wrote.
The move has to be rubber-stamped in a European Parliament vote next month.
Downing Street confirmed the outcome but had no immediate reaction.
Cameron was defiant as he arrived for the summit, insisting Juncker was "the wrong person" for the role.
"I know the odds are stacked against me, but that doesn't mean you change your mind — it means you stand up for what you believe and you vote accordingly," he said.
The British leader later wrote on Twitter: "I've told EU leaders they could live to regret the new process for choosing the Commission President. I'll always stand up for UK interests."
Leaders are expected to try and appease Cameron, potentially by offering London a top job in Brussels, but the dispute threatens to fuel euroskeptic sentiment in Britain ahead of the referendum, to be held if Cameron's Conservatives win next year's general election.
Cameron could also "retaliate" against the nomination of Juncker — who he sees as too federalist and unable to deliver reform — by refusing to sign the conclusions.
The disagreement comes a month after anti-EU parties made sweeping gains in European elections, with outright victories for the UK Independence Party in Britain and the National Front in France.
German Chancellor Angela Merkel, Europe's most powerful leader, on Thursday urged EU colleagues to "compromise" with Britain.
"I think we can find compromises here and make a step towards Great Britain," she said.
"I repeatedly spoke of a European spirit which is needed and which will help us to find good solutions."
She and Cameron met briefly for talks before the main discussions on Friday, officials said.
Other European leaders seemed to be heeding Merkel's advice as they arrived for the summit on Friday.
"Europe needs Britain to be part of us," Danish Prime Minister Helle-Thorning Schmidt told reporters.
"I hope that after today that we can get back on track."
European leaders enjoyed a lunch of fresh tomato gazpacho, turbot with chervil and baby vegetables and chocolate and apricot millefeuille before an afternoon of tough negotiations.
Facing rising euroskepticism at home, Cameron is demanding EU reforms including the repatriation of powers from Brussels ahead of the planned referendum.
A string of senior jobs in the EU are up for grabs this year which could be used in an overall package to sweeten the pill of Juncker's nomination for Cameron.
Another summit is set to take place on July 16 to decide the positions, and analysts say a British politician could be offered a senior job.
Other compromises could include naming Thorning-Schmidt as Van Rompuy's successor as European Council president.
Away from disagreements over top jobs, European leaders also signed landmark association and trade accords with Ukraine, Georgia and Moldova.
The pact, inked by Ukraine's new President Petro Poroshenko, has been at the heart of a months-long crisis in Ukraine and is fiercely opposed by Russia.
Poroshenko described the move as "a historic day, the most important day since independence" from Moscow in 1991.
It was then Ukrainian president Viktor Yanukovych's decision to put the agreements on ice in November, under pressure from Moscow, which led to protests in Kiev and his ouster, followed by Russia's annexation of Crimea and subsequent unrest in east Ukraine.