The state of emergency gives authorities greater powers to deal with the crisis, allowing them to shut down roads and limit the working of public institutions. It also speeds up court processes for asylum-seekers.
Technically, parliament must still approve the deployment of the military. However, Associated Press reporters at the border have already spotted heavily armed military personnel with vehicles and dogs at the border in recent days.
The legislation makes it a crime to try to breach a razor-wire fence along the border with Serbia and also includes longer prison terms for convicted human traffickers.
Hungarian officials closed two of seven border crossings with Serbia Tuesday morning. The night before, officials deployed a boxcar covered with razor wire to close a key border crossing along a railroad track that had been the main entry point for migrants.
Also Read
There were chaotic scenes at the main border crossing near Roszke, Hungary, as the Hungarians opened a small temporary office to process people on the edge of no man's land and crowds tried to squeeze inside.
A group of migrants also blocked the main highway connecting Serbia and Hungary, saying they will refuse food and water until they are allowed to cross into Hungary.
The sit-in protest is happening on the no man's land between Roszke and Horgos, Serbia, which is the main border crossing between the two countries.
Those who were lucky enough to make it into Hungary the day before were boarding buses. One Hungarian police officer said they were being sent directly to Austria.
People had dashed to make it into the country in recent days, hoping to reach Western Europe before it was too late. A record 9,380 migrants entered Hungary on Monday, beating the previous record of 5,809 set just a day earlier.