Ivan Gasparovic has been elected as Slovak president in a surprise outcome as the country prepares to join the EU.
By Rob Cameron
Mr Gasparovic is a familiar face from the era of Vladimir Meciar
He beat one-time close ally Vladimir Meciar, Slovakia's controversial former prime minister.
Even before the first round, Ivan Gasparovic was joking to reporters that he who has the last laugh, laughs loudest.
Today Mr Gasparovic is laughing all the way to the presidential palace.
He won just under 60% of the vote in Saturday's poll, compared to Vladimir Meciar with 40%.
It was a result few had expected.
Two years ago Mr Gasparovic stormed out of Mr Meciar's nationalist Movement for a Democratic Slovakia after being unceremoniously struck off the list of candidates for the 2002 parliamentary elections.
Now he has exacted his revenge, humiliating his former boss to clinch the presidency.
In the end it seemed the prospect of Vladimir Meciar as president was enough to prompt many Slovaks to turn up and vote for Mr Gasparovic, a man repeatedly described by politicians and the media in Slovakia as "the lesser of two evils."
Mr Meciar earned a reputation for controversial nationalism
Turnout was around 43%, much higher than early predictions of around 30%.
But many Slovaks will have mixed feelings about this result.
Mr Gasparovic, chairman of parliament during the Meciar era, supported all of Mr Meciar's controversial policies, including stripping away the rights of Slovakia's large Hungarian community and clamping down on the state-controlled media.
He voted against the prosecution of Ivan Lexa, the head of the Slovak secret service accused of masterminding the 1995 kidnapping of the son of former president Michal Kovac, one of Mr Meciar's fiercest rivals.
However, unlike Mr Meciar, Mr Gasparovic recently apologised for the mistakes of the past.
Observers say it is too early to say what kind of president Mr Gasparovic will turn out to be when he receives the keys to Bratislava's presidential palace on 15 June.
Undoubtedly many foreign politicians - nervous at the prospect of shaking hands with Vladimir Meciar - will breathe a huge sigh of relief.
The new leader says he will defend Slovakia as it enters Europe
Indeed, for many Slovaks, Mr Gasparovic's chief attraction is that few abroad know who he is.
However several questions remain.
Mr Gasparovic says he is determined to defend Slovak national interests when the country joins the European Union in two weeks' time.
But he was also openly supported by the hardline nationalist Slovak National Party, a party known for its virulent anti-Hungarian rhetoric.
The new president is unlikely to receive a warm welcome when he visits neighbouring Hungary.
At home too, he could cause problems for the shaky centre-right coalition, fast-losing popularity with a series of bold public finance reforms.
One of the government's harshest critics is Robert Fico, a left-wing populist who tops the opinion polls.
Mr Fico bankrolled Mr Gasparovic's election campaign and urged voters to go out and vote for him.
Robert Fico has his sights firmly set on the premiership.
With his ally Mr Gasparovic safely installed in the presidential palace, he could be one step further towards achieving that goal.