Slovenian soldiers will help police manage a surge of migrants from Croatia, the government said after an all-night emergency meeting.
"The inflow of migrants over the last three days has exceeded all manageable possibilities," a government statement said, adding that parliament would be asked to approve legislation allowing soldiers to help in the crisis "under very specific circumstances".
Under current law, the army can only provide technical and logistical support.
Slovenian authorities said on Monday (local time) they had refused to let in more than 1000 migrants arriving from Croatia after a daily quota had been reached, stoking fears of a new human bottleneck on the western Balkan route.
The desperate refugees and migrants were forced to spend the night in freezing temperatures near railway tracks after police stopped them from walking across the border dividing the two EU states.
They are among thousands of people – mostly fleeing violence in Syria, Iraq and Afghanistan – who forged a new route to northern Europe after Hungary sealed its Croatian border with a razor-wire fence.
The Hungarian government's latest move to stop the flow through Greece, Macedonia and Serbia has pushed the migrants toward Slovenia, from where they hope to continue towards Austria and eventually Germany.
More than 8000 migrants entered Slovenia on Monday, of whom 2000 travelled on to Austria, Ljubljana said.
"This does not mean a state of emergency," Prime Minister Miro Cerar told journalists early Tuesday.
State radio said parliament would debate the emergency legislation on Tuesday and that it could enter into force within days.
"It is delusional to expect a country of two million to [accomplish] what much larger countries haven't been able to," the government said.