Croatia's conservative opposition was ahead in a run-off presidential vote on Sunday, capitalising on popular discontent over the country's economic woes and staking a claim to power ahead of a parliamentary election later in the year.
The job is largely ceremonial, but political analysts say a win for Kolinda Grabar-Kitarovic of the opposition HDZ would bode well for the party's prospects in the more important general election due in late 2015.
An exit poll put Grabar-Kitarovic ahead with 51.4 percent of the vote, against 48.6 percent for incumbent Ivo Josipovic.
In Croatia, the president cannot veto laws but has a say in foreign policy and defence.
The ex-Yugoslav republic of 4.4 million people, which joined the European Union last July, has been in recession for six years. No growth is expected in 2015, unemployment stands at 19 percent and high taxes and poor administration hamper business.
Josipovic, who was seeking a second five-year term with the support of the increasingly unpopular ruling Social Democrats, won the first round of the election on Dec. 28 by a narrow margin.
But he faced a stiff challenge from Grabar-Kitarovic, a former diplomat.
"Six years of crisis is a long time; obviously a large number of people are opting for something new," Sanja Modric, a columnist for the left-leaning Novi List daily, said after the exit polls were released.
Josipovic, 57, is a jurist and composer of classical music who won his first term on an anti-corruption ticket, but has kept a relatively low profile as the country grappled with its worst economic crisis since becoming independent in 1991.
Grabar-Kitarovic, 46, a former foreign minister and ambassador to Washington, says Croatia needs a change of course and a more active head of state.
"Her victory would throw the door wide open for the HDZ's triumph in the parliamentary ballot, on the wave of popular discontent with the lack of any success of this government," said Zeljko Trkanjec, editor of the daily Jutarnji List.
Not all voters agreed it was time for a change.
"Josipovic could have been more vocal as president, given our disastrous economic situation, but he is still the better of the two, with more experience and stature," said pensioner Zvonimir Hrabar, casting his vote in downtown Zagreb.
The HDZ ruled Croatia from its first democratic election in 1990 until its founder, President Franjo Tudjman, died in December 1999. Since then it has alternated in power with the Social Democrats but has never regained the presidential post.