Croatia is holding its first parliamentary election since joining the European Union in 2013 - and the outcome threatens to disrupt the flow of tens of thousands of refugees crossing the Balkans if conservatives return to power and implement tough measures against the surge.

Croatia's ruling centre-left coalition faces a strong challenge in Sunday's vote from the centre-right opposition, with the two running neck and neck in pre-election polls.

More than 300,000 asylum-seekers fleeing wars and poverty in the Middle East, Asia and Africa have passed through Croatia since mid-September in their search for a better life in wealthier EU countries such as Germany or Sweden.

The crisis has been a challenge for Croatia's ruling Social Democrats, but they skilfully used the influx to divert attention from critical economic problems and improve their plummeting ratings ahead of the vote.

Their leader, prime minister Zoran Milanovic, managed the daily flow of thousands by dispatching them first straight to neighbouring Hungary and then - when Hungary shut its borders to the refugees - to Slovenia, alienating the two EU neighbours in the process.

The opposition Croatian Democratic Union, led by former spy agency chief Tomislav Karamarko, has claimed Milanovic's government is too lenient toward the refugees and has demanded tougher measures such as deploying troops and building fences at the border with Serbia, where most enter Croatia.

"The migrant crisis came at the perfect time for Milanovic to divert voters' attention from real problems facing the country, such as the economy," said political analyst Zeljko Milardovic. "He was virtually politically dead only a few months ago."

Croatia, with a population of 4.2 million, has one of EU's poorest economies. It recently emerged from a six-year recession but unemployment is hovering around 16%, of which 43% among young people.

Neither the conservatives nor the left-wing coalition are expected to win an outright majority in Sunday's vote, so Croatia's next government will depend on several small parties in the 151-seat parliament.

Sunday's vote represents a revival for the conservatives, who led Croatia during its war from independence from the Serb-led Yugoslavia in the 1990s and then dominated its political scene for years. Their popularity plummeted since 2013 after a series of corruption trials against top officials.

ends