Slovenia will send troops to the Croatian border to help police control the refugee influx into the country, most of the refugees come from war-torn countries like Syria and Iraq.
Legislation to send troops to the border was passed by the Slovenian parliament on late Monday.
Announcement came from parliament speaker Milan Brglez, legislation passed with 69 votes in the 90-seat parliament.
Prime Minister Miro Cerar said at a news conference after the voting session that the soldiers would be assigned to border duty for only three months.
"This will be no military action (of the army). The army will just help police in guarding the border” and direct refugees “who may want to cross the green border into the reception centres," Cerar said.
The army is also authorised to use force in case of an emergency to "ensure citizens safety," Cerar said.
The number of soldiers will be depend on the size of the refugee influx.
Slovenia’s decision came after its northern neighbour Austria announced that it will limit refugee entries into the country.
Austrian Interior Minister Johanna Mikl Leitner announced on Thursday Slovenia will allow in no more than 3,200 refugees a day.
Hungary closed its border with Croatia to direct refugees to west Slovenia in October.
About 474,000 refugees have entered Slovenia on their way to Austria and other northern European states.
Slovenia, with two million citizens, is the smallest country on the Balkan refugee route and has a 670-kilometre border with Croatia.
Interior Minister Vesna Gyorkos Znidar said earlier on Monday the country would do everything to prevent it from becoming a passage point for refugees.
She also added the legislation is to help police "perform their tasks inside the country, where we expect significant problems when migrants are denied entrance (into Austria)."