The Slovenian Parliament on Thursday endorsed the government-sponsored bill of amendments to the Aliens Act with restrictive regulations for potential migrants and asylum seekers, criticised by international nongovernmental organisations and the Council of Europe.

A total of 47 MPs voted in favour of the new legislation and 18 voted against. After the announcement in the national gazette, the law will enter into force.

The new legislation enables Slovenian police to seal the country’s borders to illegal migrants for a limited period if needed.

The law is meant to prevent a repeat of a six-month-long flood of migrants across Slovenia that ended in March 2016, when several countries closed the main Balkan migration route.

Around 500,000 illegal migrants crossed Slovenia, the smallest country along the migration corridor, on their way to desired destinations in the wealthier Western European countries.

Interior Minister Vesna Gyorkos Znidar said the law did not contravene the European legislation and international conventions which refer to refugees and not economic migrants.