Croatia began voting in a parliamentary election on Wednesday after a bitter campaign between a prime minister seeking a new term and a populist president who wants to be head-of-government despite a court warning.

The showdown between Prime Minister Andrej Plenkovic, a conservative, and President Zoran Milanovic, a left-wing populist, comes as the European Union nation wrestles with corruption, a labour shortage, the highest inflation rate in the eurozone and illegal migration.

For months, Plenkovic and his ruling Croatian Democratic Union (HDZ) seemed poised for an easy victory that would secure his third term as premier.

But in mid-March, Milanovic made the shock announcement that he would challenge Plenkovic and become candidate prime minister for the Social Democrats (SDP).

Milanovic was prime minister shortly before Plenkovic and his role as president is largely ceremonial.

"Croatia has never had such a corrupt government," Milanovic, 57, said in his final address ahead of the vote.

Labelling the elections a "referendum on the country's future" he urged citizens to "go out and vote for anyone but the HDZ".

Milanovic called Plenkovic the "godfather of crime" and highlighted the recent appointment of the country's new chief prosecutor, a judge with alleged ties to corruption suspects.

Corruption has long been a problem for the HDZ.

Several of Plenkovic's ministers have stepped down following accusations and the anti-graft fight was key to Croatia's bid to join the EU in 2013.

- 'Russian world' -


But Milanovic canvassed across Croatia despite the country's top court ruling that he could only stand in the election if he steps down as president first.

Plenkovic -- who has served as premier since 2016 -- accused his rival of violating the constitution, making hate speech and called him a "coward" for not resigning.

The prime minister insisted on his role in guiding the country of 3.8 million people into the eurozone and Europe's passport-free Schengen area last year.

But with an average monthly wage of 1,240 euros ($1,345), the country remains one of the EU's poorest.

Plenkovic, 54, has also lambasted Milanovic over his criticism of EU backing for Ukraine against Russia's invasion and the president's opposition to training Ukrainian soldiers in Croatia.

"Milanovic is pushing Croatia and the Croatian people into the Russian world," Plenkovic told one rally.

Milanovic has argued that he was protecting Croatian interests and sought to prevent the country being "dragged into war".

The president tops political popularity surveys and his entrance in the campaign has boosted the SDP.

But no party is expected to secure an outright majority in the 151-seat assembly, according to polls that say the HDZ will be the biggest party with about 30 percent of the vote.

The SDP follows with 20 percent while the nationalist right-wing Homeland Movement comes third, making it a possible kingmaker in forming a new government.

The HDZ has dominated Croatian governments since the country's independence from Yugoslavia in 1991, while the SDP has been the opposition mainstay.

Milanovic, who served as prime minister from 2011 to 2016, is known for his fiery rhetoric and profanity in tirades against HDZ opponents, EU officials and his critics.

His mandate expires in January but he said he would step down if the SDP and its allies secure a majority to form a new government.

Polling opened at 0500 GMT and closes 12 hours later.