Retired Nato general Petr Pavel has been elected as the new president of the Czech Republic, seeing off his populist challenger Andrej Babis.
The 61-year-old took 58.32% of the vote, results released by the state statistics office showed.
Mr Babis – who served as prime minister between 2017 and 2021 – conceded defeat in a speech to supporters soon after the results were announced.
The ex-general will replace Milos Zeman, whose second term ends in March.
The second-round runoff between Mr Babis and Mr Pavel was portrayed as a contest between populist oligarchy and liberal democracy.
The elections’ results follow an ill-tempered campaign marred by alleged death threats and disinformation.
Earlier this week Mr Pavel was forced to take to Twitter to deny rumours of his own death, circulated by a fake website and emails hosted by Russia’s Yandex server.
The disinformation was condemned by Mr Babis, who a few days ago cancelled all remaining in-person campaign appearances over fears for his personal safety after receiving an anonymous death threat.
Speaking after the announcement of the results on Saturday, Mr Pavel said values such as truth, dignity, respect and humility had won.
“The vast majority of Czechs share these values, and it’s time to return them to the castle and to politics,” he added.
There were thunderous chants of “Pavel na Hrad” (Pavel to the Castle) – a deliberate echo of the chants of “Havel na Hrad” that filled the streets and squares of Czechoslovakia in November 1989.
Indeed Mr Pavel, a firm advocate of Czech membership of Nato and the EU, has often invoked the spirit of Vaclav Havel, the playwright, dissident and first president of the Czech Republic after the Velvet Revolution against communist rule.
And his victory will be seen as an affirmation his country is firmly rooted in the West.
In congratulating Mr Pavel, the European Commission President Ursula von der Leyen said she welcomed his “strong commitment to our European values”.
Other world leaders, including Ukrainian President Volodymyr Zelensky and Kosovo’s president Vjosa Osmani, have also taken to social media to congratulate the newly elected president.
Meanwhile, Slovakia’s president Zuzana Caputova – a fellow liberal, pro-western politician – made a surprise appearance on stage alongside Mr Pavel.
There was rapturous applause from Mr Pavel’s supporters, many of them dressed in the flannel shirts that have become an unofficial symbol of his campaign.
Across town, at the offices of ANO – the political party created by Mr Babis – there were smiles but the disappointment was palpable.
“I wish you a world without Babis. Forget about Babis. Try to live without Babis,” the former prime minister told reporters, in a barb at his many opponents on Twitter.
“Stop waking up in the morning with hatred towards Babis and falling asleep with hatred towards Babis,” he said, after congratulating his opponent and denying he had run a negative campaign.
Mr Pavel has backed keeping the Czech Republic anchored in the European Union and Nato and has come out strongly in favour of further military aid for Ukraine to fight against Russia’s invasion.
By contrast, Mr Babis was forced to backtrack earlier this week after he suggested that he would not live up to the country’s obligations to defend a fellow Nato member if attacked.
“I want peace, I don’t want war,” Mr Babis said during a televised debate. “In no situation would I send our children or the children of our women to war.”
In the Czech Republic, the role of president is a mostly ceremonial but still influential post. The presidents choose prime ministers and central bank bosses, as well as having a say in foreign policy.