Slovenia will keep out all migrants apart from those planning to seek asylum in Austria and Germany, Interior Minister Vesna Gyorkos Znidar said Thursday at a news conference, adding that the country would also strengthen border controls.
The announcement came a day after Slovenia's neighbor Austria said it would restrict the entry of migrants.
"We will act in all directions so as to prevent Slovenia becoming a pocket for stranded migrants," Gyorkos Znidar said after a regular government meeting.
Slovenia is the smallest country on the Balkan migration route. About 409,000 migrants have entered since October, when Hungary closed its borders and pushed the migrant route west through Slovenia.
So far almost all migrants have continued on their way to Austria and further on to northern Europe, but Austria said Thursday that it would restrict the number it would take in.
Slovenia has said it will have to follow Austria's example because the small Alpine state of 2 million people does not have the capacity to accommodate a large number of migrants.
Gyorkos Znidar urged the EU to reach agreement on stopping migrants on the border between Macedonia and Greece to prevent them from continuing north through the Balkans.