Leftist former prime minister Zoran Milanovic, who has pledged to make Croatia a tolerant country turning the page on its wartime past, won Sunday's presidential run-off vote, defeating the incumbent conservative leader.

Milanovic took 52.7 percent of the vote while President Kolinda Grabar-Kitarovic, who had tried to unite a fractured right-wing, garnered 47.3 percent, according to results based on vote count at nearly all polling stations released by the electoral commission.

Croatian President Kolinda Grabar Kitarovic  faces a very serious challenge from former leftist prime minister Zoran Milanovic
Croatian President Kolinda Grabar Kitarovic faces a very serious challenge from former leftist prime minister Zoran Milanovic AFP / Denis LOVROVIC

The second-round election was held just days after Croatia took over the European Union's helm for a six-month period, which will be dominated by Brexit and the bloc's enlargement.

At the same time, the EU's newest member is struggling with a mass exodus of its people, corruption and a lacklustre economy at home.

Grabar-Kitarovic campaigned on a slogan promoting "real Croatia", hinting she believes the ruling conservative HDZ party that backed her was the only one who can truly represent the country.

The vote comes just days after Croatia took over the EU's six-month rotating presidency
The vote comes just days after Croatia took over the EU's six-month rotating presidency AFP / Denis LOVROVIC

Milanovic, a Social Democratic, called such statements "very dangerous", and advocated for a "normal Croatia" as a liberal democracy which promotes equality for all citizens.

"Four million of us ... are looking for our place in Europe which is, despite all the problems, the nicest place to live, the most peaceful project in which Croatia must find its place and interest," Milanovic told supporters in Zagreb after his victory.

Grabar-Kitarovic is campaigning on a "real Croatia" ticket
Grabar-Kitarovic is campaigning on a "real Croatia" ticket AFP / Damir SENCAR

"Let's be united in (our) differences," the 53-year-old said.

In the campaign Milanovic stressed that the "wars are over", referring to Croatia's 1990s independence war that remains an emotive issue.

Milanovic led the first round with around a third of the vote
Milanovic led the first round with around a third of the vote AFP / Denis LOVROVIC

Grabar-Kitarovic, 51, the country's first female president, had tried but failed to lure back hardliners who had voted for a nationalist folk singer in the presidential election's first round in December.

She stressed unity, patriotism and references to the 1990s war in her re-election bid.

Conceding defeat on Sunday evening Grabar-Kitarovic promised a "civilised transfer" of power to Milanovic.

The vote comes just days after Croatia took over the EU's six-month rotating presidency
The vote comes just days after Croatia took over the EU's six-month rotating presidency AFP / Denis LOVROVIC

She stressed that "Croatia needs stability" and unity as "we are the strongest when we are together."

Analysts say that Milanovic, who dominated in the cities, also won thanks in part to the split among the right-wingers.

The election was viewed as a key test for the ruling HDZ party of moderate Prime Minister Andrej Plenkovic ahead of parliamentary elections later this year and Grabar-Kitarovic's loss was seen as a heavy blow.

"It will weaken the (HDZ) party" and harms Plenkovic's reputation, political analyst Tihomir Cipek said.

The prime minister is also facing the discontent of hardliners within the HDZ over his moderate policies.

Grabar-Kitarovic presented herself as the "woman of the people" with humble farming roots, and is well known for stunts such as singing in public which her critics deride as embarrassing.

She also came under fire for downplaying the crimes committed by Croatia's World War II pro-Nazi regime.

Meanwhile, Milanovic, premier from 2011 until 2016 whose government failed to push through much-needed reforms, sought to make a political comeback and throw off a reputation as arrogant and elitist.

He will now take office during Croatia's EU presidency where four main issues are likely to dominate -- the bloc's relationship with the UK after Brexit; the membership bids of Western Balkan states; climate change; and the bloc's budget framework for the next decade.

The Adriatic country joined the EU in 2013, but its economy, strongly relying on tourism, remains one of the bloc's weakest.

The EU's open borders also accelerated the exodus of its people to seek better pay in wealthier member states.

Many emigrants also cite corruption, nepotism and poor public services as reasons for leaving.

"Politicians are wrangling about the past and insignificant issues while my generation is leaving," said Maja Maric, a 20-year-old economy student. She said she voted for a "lesser evil".