Croatia's conservative opposition has won a narrow presidential victory, capitalising on popular discontent over economic decline and setting down a marker for parliamentary elections later in the year.

Kolinda Grabar-Kitarovic, a former diplomat, can expect months of tense cohabitation with the Social Democrat-led government before Croats vote again in the general election due in late 2015.

The job is largely ceremonial, but her win may signal a comeback for the opposition HDZ.

She told her supporters: "There is no room for triumphalism. Let's work for the prosperity of our country."

In Croatia, the president cannot veto laws but has a say in foreign policy and defence.

After six years of recession, unemployment is running at 19 per cent in the ex-Yugoslav republic of 4.4 million people, which joined the European Union last July. High taxes and poor administration hamper business and the economy is not expected to grow in 2015.

"I expect a certain shift in foreign policy, with a little more focus on Nato and the EU and a little less on the (Balkan) region," said Andjelko Milardovic of the Institute for Migrations, a Zagreb-based think-tank, adding the result was a pointer to the parliamentary election.

Ms Grabar-Kitarovic, 46, a former foreign minister and ambassador to Washington, campaigned on the need for a change of course and a more active head of state to help the country overcome its worst economic crisis since independence in 1991. She takes office as Croatia's first woman president next month.