Slovenia border fence migrant crisis
A Slovenian soldier observes migrants queuing to cross the border into Spielfeld, Austria from the village of Sentilj Reuters

Slovenia is set to become the second European country to erect a razor-wire fence to keep migrants out. Prime Minister Miro Cerar said work to build the barrier on the border with Croatia will begin "in the next few days".

Cerar said the fence will help stem the inflow of migrants that have crossed in the thousands in the small mountainous state on their way to central and northern Europe. "At this moment about 30,000 immigrants are on their way toward Slovenia," Cerar said.

The centrist leader said he informed his Croatian counterpart of the decision. He also stressed that the fence will not shut access to the country completely but is aimed at directing and slowing down the influx, preventing "the uncontrolled entry of immigrants".

Cerar maintained Ljubljana was acting to protect the Schengen area borders. Croatia is a EU member but is not part of the Schengen agreement on the abolishment of internal borders.

Some 170,000 people have passed through the country over the past few weeks. The flow has significantly increased since the anti-immigration Hungarian government brought fences back into fashion in Europe, as it sealed off its borders earlier this year.

The move created a domino effect. Tens of thousands of people walking their way up the Balkans from Greece have in fact been forced to take a detour to Croatia to then enter the Schengen area from Slovenia and later proceeded to Austria. Both Zagreb and Vienna have since announced they were considering building a border fence.

More than 750,000 migrants and asylum-seekers have reached European shores in 2015, according to the United Nations (UN). The UN refugee agency said they expect up to 5,000 new arrivals per day from Turkey between November 2015 and February 2016.