Croats are voting in a parliamentary election as the country faces a wave of refugees and slowly emerges from six years of recession.

Opinion polls predict a tight race between the ruling centre-left alliance, led by the Social Democrats (SDP), and the rival conservative Patriotic Coalition.

The outcome of Sunday’s vote, the first since the country joined the European Union in 2013, is likely to entail lengthy coalition talks with smaller parties.

The conservative coalition favours a tougher stance than the ruling Social Democrats on the refugee issue, seeking stricter border controls to manage the flow of people crossing Croatia on their way to Western Europe.

RELATED: Refugees rush into Croatia as border opens

More than 330,000 refugees and migrants have passed through Croatia since mid-September, part of a massive exodus of people fleeing conflicts and poverty in Syria, Iraq, and beyond.

They have been crossing the border from Serbia at a daily rate of 5,000 or sometimes even 10,000, but few linger in Croatia, one of the poorest EU states where unemployment stands at 16 percent, well above the bloc’s average of 9 percent.

The HDZ, which leads the Patriotic Coalition, has accused the centre-left government of Zoran Milanovic, the prime minister, of being soft and ineffectual in handling the refugee issue.

But political analysts say the HDZ, which plays on issues of national identity and family values in the mainly Catholic nation of 4.4 million people, may struggle to attract sufficient support from smaller parties to build a stable government.

This could allow the Social Democrats to hold on to power even if they win fewer votes on Sunday.

Milanovic says his party deserves another four-year mandate because the economy, which is heavily reliant on tourism, has started to grow again after six years of recession that wiped out about 13 percent of national output.

His insistence that Croatia take a humane stance on the refugees and facilitate their flight has also struck a chord with voters who remember the violence and displacement their own country suffered during the break-up of Yugoslavia in the 1990s.