"We decided to create temporary technical barriers, including a fence, on the Schengen border, meaning the border with Croatia, in the next few days, to protect it from refugees," Cerar said, as quoted by the Croatian Vecernji list newspaper.
According to him, the border will remain open as the fence has been designed to force refugees to enter the country through designated checkpoints.
Europe has been beset by a refugee crisis, with hundreds of thousands of undocumented migrants fleeing their home countries to escape violence and poverty. The flow of refugees entering Slovenia dramatically increased in October, when Hungary closed its southern border with Croatia.
Over 710,000 migrants have arrived in Europe since the beginning of 2015, according to the EU border agency Frontex.