Slovenia's parliament is expected to approve changes to its laws later on Tuesday to enable the army to help police guard the border, as thousands of migrants flooded into the country from Croatia after Hungary sealed off its border.

The government had proposed amendments to its Law on Defence overnight, after 8,000 migrants crossed in Slovenian territory on Monday. Only 2,000 of them passed into Austria.

"This is not about enforcing an extraordinary condition, it is about strengthening control on the border," Prime Minister Miro Cerar told the national radio Radio Slovenia.

The government has not given details of the proposed changes to the law, but issued a statement stressing Slovenia's lack of capacity to deal with the influx and calling on fellow EU countries to help.

"Slovenia is the smallest country on the Balkan migration route and has therefore limited possibilities of border control and accomodating migrants," the government said.

"Therefore Slovenia publicly calls upon the (EU) member states and the European institutions to actively engage in taking over this burden."

Slovenia, with two million citizens, borders Croatia, Hungary, Austria and Italy.

The government said the country will do everything in its power to control the migration route and ensure normal functioning of the state but added:

"It is an illusion to expect that a country of two million people will stop and solve what larger members were unable to."

On Monday, the United Nations refugee agency (UNHCR) said that more than 10,000 migrants were stranded in Serbia, which borders Croatia, while many more were on their way there.