Slovenia's army will help police deal with the thousands of refugees expected to arrive from Croatia in the coming days.
Prime Minister Miro Cerar made the announcement as around 2,700 people arrived on its borders with Croatia yesterday, only two days after Hungary closed its frontier with Croatia.
He said Slovenia would continue to accept refugees as long as Germany and Austria keep their borders open.
Many of the refugees aim to continue north to Austria and Germany - more than 600,000 migrants have reached the EU by sea so far this year.
Yesterday, the Turkish coastguard recovered the bodies of 12 people from the Mediterranean after they drowned while trying to reach the Greek island of Lesbos in a wooden boat.
Hungarian Prime Minister Victor Orban said his country would no longer accept refugees crossing its borders because EU leaders have failed to agree on a plan to manage the crisis.