The battle for the top job at the European Commission is reaching an end with Jean-Claude Juncker emerging triumphant, leaving British Prime Minister David Cameron in a fix.

EU leaders gave the 59-year-old Brussels veteran the green light at a summit in the Belgian capital, despite fervent opposition from the British and Hungarian governments.

In an unprecedented ballot forced on them by Cameron, the European Council voted 26-2 to nominate Juncker as president of the executive European Commission, a British official said.

Only Cameron and Hungarian Prime Minister Viktor Orban voted against.

Cameron objects to the Luxembourger’s principles of closer political union, as he hopes to negotiate reforms to the 28 member bloc.

“I’ve told EU leaders they could live to regret the new process for choosing the Commission president,” Cameron tweeted from inside the meeting. “I’ll always stand up for UK interests.”

He had warned that Juncker’s appointment could hasten a referendum on Britain’s EU membership. However, Juncker’s supporters admire his consensus building skills and his dedication to EU integration.

Before Junker can start work he will have to pass a parliamentary vote in July.