Croatia's ruling conservatives said Monday they will analyze why their candidate lost a presidential election to a leftist challenger in order to prevent this from happening again at the upcoming parliamentary vote later this year.

"The aim of the analysis and its conclusions is for us to come out stronger and not repeat at the parliamentary election whatever turned out to be a flaw or a mistake during this campaign," said Davor Bozinovic, interior minister and a senior member of the Croatian Democratic Union, or HDZ, party. "We are not looking for culprits, but reasons why."

The conservative party's candidate, outgoing President Kolinda Grabar Kitarovic, was beaten Sunday by liberal opposition challenger and former prime minister Zoran Milanovic.

Milanovic won 53 per cent of votes while Grabar Kitarovic had 47 per cent. Croatia's state election authorities on Monday formally confirmed Milanovic's victory.

The loss of the presidency is seen as a major blow for the ruling party, which has been a dominant political force in Croatia since the country's 1991 independence from Yugoslavia. It also marks a rare triumph of a leftist politician vying for a top post in populist-dominated Central Europe.

Grabar Kitarovic reacts after the first results were announced. Support for the incumbent president had ebbed following a series of gaffes in the election campaign. (Antonio Bronic/Reuters)

Sunday's vote was held just days after Croatia's conservative government took over the European Union's rotating presidency for the first time since joining the bloc in 2013. Croatia will preside over the U.K.'s divorce from the EU and the start of post-Brexit talks.

Croatia is deeply divided among the conservatives and the left.

Remade image since PM tenure

The voting on Sunday also resulted in around 4.3 per cent invalid ballots, most of which are believed to belong to the right-wing supporters of singer Miroslav Skoro, who won nearly a quarter of ballots in the first round on Dec. 22. He refused to support any of the front-runners in Sunday's run-off.

Prime Minister Andrej Plenkovic, a moderate who has sought to position the HDZ at the centre-right of the political spectrum, said it was an "enormous number" for Croatian elections.

Plenkovic said he will co-operate with the new president "in accordance with the constitution and the law."

"We will do all we can so that HDZ win again at the parliamentary election."

Milanovic, 53, was Croatia's prime minister until early 2016. During his term, Croatia approved EU membership in a referendum and brought some liberal reforms — including boosting rights of same-sex couples — in the staunchly Catholic nation.

A veteran politician, Milanovic was known for a sometimes populist style and fiery temperament. He reinvented himself for the presidential vote as a calm, mature leader who has learned from his own mistakes and is ready to respond with wisdom to any challenges.

Support for Grabar Kitarovic has ebbed following a series of gaffes in the election campaign. The 51-year-old had a career in diplomacy and in NATO before becoming Croatia's first female president in 2015. Going into the run-off, Grabar Kitarovic tried to evoke Croatia's unity during the 1991-95 war in a bid to attract far-right votes.

Though an EU member, Croatia still has corruption problems and economic woes — issues that haven't been resolved since its devastating 1991-95 war to break free of the Serb-led Yugoslav federation.