LJUBLJANA (Reuters) - The migrant crisis engulfing Europe threatens to reignite conflicts between former Yugoslav republics which fought each other during the 1990s, Slovenia’s prime minister said on Tuesday.

Migrants wait for transport to Slovenia after they registered at a new winter refugee camp in Slavonski Brod, Croatia, November 3, 2015. REUTERS/Antonio Bronic

Hundreds of thousands of migrants, many of them fleeing Syria’s civil war, have taken the Balkan route from Greece to western Europe this year, putting great strain on the finances and infrastructure of transit countries, including the ex-Yugoslav states of Macedonia, Serbia, Croatia and Slovenia.

The situation worsened when Hungary, an eastern outpost of the European Union’s passport-free Schengen zone, shut its southern border to the migrants on Oct. 16, diverting the flow of around 135,000 people westwards from Croatia into Slovenia.

Countries have angrily accused each other of failing to register the refugees properly or to share information.

“If the migrant crisis is not adequately controlled as agreed at the summit in Brussels there is a possibility of conflict situations between the states of the Western Balkans,” Slovenian Prime Minister Miro Cerar told a news conference.

“It is possible that a small conflict would initiate a wider reaction because of the very difficult recent history (of the region), which is why it is very important that we solve this crisis together as no country can solve this problem by itself.”

More than 100,000 people were killed and up to four million were displaced during the violent breakup of Yugoslavia during the 1990s, the last migrant crisis to shake Europe.

Cerar is known for making dire warnings. At emergency EU talks on Oct. 25 in Brussels, he said the 28-nation bloc faced collapse if it could not agree on a plan to tackle the sudden influx of the refugees.

On Tuesday Cerar said the EU must control its external border in Greece much better. He also said the flow of migrants transiting the Balkans could move further west to Albania and Montenegro, though he did not elaborate.

Cerar said Slovenia might follow Hungary’s example by building a fence along “relevant parts of the border” to better control the migrant flow, adding: “We do not plan to close the border.”