The Croatian election tomorrow could usher in a new centre-right government favouring much stricter border controls, possibly even leading to the continent’s southern border being closed.

The country has become a major route for the hundreds of thousands of migrants travelling through Europe since Hungary built a razor-wire fence along its border with Serbia.

The Croatian government, led by Social Democrat Zoran Milanovic, has welcomed the migrants, promising to house them temporarily as they travel north towards Slovenia and then through Austria and Germany.

However, his position has infuriated neighbouring countries, with the leaders of Hungary, Serbia and Slovenia criticising his open borders policy, and accusing him of making the problem worse.

The opposition conservative Croatian Democratic Union (CDU), which up to now has led the polls, has also strongly criticised Mr Milanovic’s policy since the start of the migrant crisis, calling for a much tougher line with military intervention if necessary.

At present, Croatia is the only country the migrants can travel through after passing through Serbia. They cannot travel north into Hungary, as the border is shut, and if they travel into Bosnia-Herzegovina they risk coming to a dead-end in the mountainous terrain.

Tomislav Karamarko, leader of the CDU, has not explicitly stated any intention to close the border, but as the crisis intensifies, he may be left with no other option.

If Croatia does close its border with Serbia and Bosnia-Herzegovina, then Hungary would likely be spurred into extending its fence along the Romanian border, thus effectively sealing off southern Europe from the Dalmatian coast to Ukraine.

However, the polls are now very tight. Mr Milanovic’s Social Democrats have staged a comeback thanks partly to an improving economy, but also due to pulling at voters’ heartstrings with the migrant crisis.

Professor Nenad Zakosek of the University of Zagreb told the New York Times that many Croats sympathise with the migrants because they themselves witnessed the violence of the Balkan War just 20 years ago.

“We all had this experience during the war,” he said. “We had refugees or we were ourselves refugees.”

Latest polls put the Social Democrats just 0.8 per cent behind the conservatives, meaning it is still all to play for.