European Union leaders have confirmed Donald Tusk for a second term as council president, overcoming weeks of strong opposition from his native Poland.
Belgian Prime Minister Charles Michel tweeted "congratulations", and Mr Tusk sent a tweet saying: "Thank you for keeping fingers crossed and for heart-felt support. It helped."
The government in Warsaw had argued that the decision should be delayed because of its displeasure with Mr Tusk, a bitter political rival.
But other leaders won out, insisting there was no appetite for a delay.
"I don't see how one country could oppose this solution when all the others are in favour," said French President Francois Hollande, echoing comment from many of the bloc's 28 leaders.
The job is one of the bloc's most prestigious. It involves chairing summits, co-ordinating the work of the member countries and making sure the 28 nations speak as much as possible with one voice on the international stage.
The EU is facing a plethora of challenges, not least the imminent divorce proceedings as Britain leaves the bloc, and does not want to be caught in an institutional quagmire over the position of a leader.
Mr Hollande said that "with a Europe that has to affirm its unity, a Europe that needs to be firm in the face of a certain number of pressures it faces, there is every reason to confirm here the nomination of Donald Tusk".
Poland's nationalist government had proposed little-known Polish EU politician Jacek Saryusz-Wolski to replace Mr Tusk, whose current term ends on May 31.
Donald Tusk is re-elected as EU president.
Polish Prime Minister Beata Szydlo said it was unheard of to confirm a president without the consent of his home nation.
"Nothing without us, without our consent," she said upon arrival for the summit. "This is a matter of principles."
Mr Tusk is a former prime minister who has a long and bitter rivalry with the leader of Poland's current governing party, Jaroslaw Kaczynski.
The government argues that Mr Tusk supports the domestic opposition in Poland and has failed to protect the country's interests in the EU.
German Chancellor Angela Merkel offered Mr Tusk public support in a pre-summit speech to politicians in Berlin.
"I see his re-election as a sign of stability for the entire European Union and I look forward to continuing working with him," Mrs Merkel said.
Maltese Prime Minister Joseph Muscat, who chaired the election, acknowledged that several member nations are unhappy that all major EU posts are held by members of the centre-right European People's Party (EPP).
But he said "they don't want to sacrifice President Tusk because of that, because they think he has done a good job".
Apart from Mr Tusk, EPP politicians Jean-Claude Juncker and Antonio Tajani head the EU's executive commission and the European Parliament, respectively.
Mr Muscat said a more equitable spreading of posts would need to be addressed some time over the coming months.