A conservative populist has become Croatia's first female president after beating the centre-left incumbent in a runoff election amid widespread discontent over economic woes in the European Union's newest member.
The state electoral commission said that after about 97 percent of the vote was counted, Kolinda Grabar-Kitarovic won 50.54 of the vote on Sunday, while President Ivo Josipovic had 49.46 percent.
The result meant that Grabar-Kitarovic won by a slight margin of about 21,000 votes.
The vote was seen as a major test for Croatia's centre-left government, which is facing parliamentary elections later this year under a cloud of criticism over its handling of the economic crisis.
The conservative triumph could shift Croatia back to right-wing nationalism, jeopardising relations with its neighbours, including bitter Balkan wartime rival Serbia.
The election was always expected to be close. In the first round two weeks ago, Josipovic won 38.5 percent of the vote, just edging Grabar-Kitarovic with 37.2 percent. The runoff was called because neither candidate captured more than the 50 percent needed to win outright.
The presidency in Croatia is a largely ceremonial position, but the vote was considered an important test for the main political parties before the parliamentary elections expected in the second half of the year.
The victory for Grabar-Kitarovic - giving her a five-year term - greatly boosts the chances of her centre-right Croatian Democratic Union to win back power.
'Vote for change'
Grabar-Kitarovic, a former foreign minister, ambassador to Washington and an ex-assistant to the NATO secretary-general, said earlier on Sunday that she felt "very confident" of a victory because "people will vote for a change".
She said that Josipovic did nothing to stop Croatia's economic downturn, including a 20-percent unemployment rate - one of the highest in the EU.
Josipovic said the president's duties did not include the government's economic policies and had proposed constitutional changes that would decentralise the country and give more power to Croatia's regional authorities.
Grabar-Kitarovic also criticised Josipovic for allegedly being too soft towards Serbs, who in the 1990s fought a war against Croatia's independence from the former Yugoslavia. She said Serbia's EU membership bid should be conditioned by Croatia.
"Serbia is our neighbourly and friendly country," Josipovic said after he cast his ballot. "But it has to meet the same conditions which we had during our bid for the European Union."
Autocratic nationalist President Franjo Tudjman and his conservative HDZ party ruled Croatia until his death in 1999, marking the start of democratisation that put Croatia, with a population of 4.2 million, on track to EU membership, which was accomplished in 2013.