No longer will waves of migrants be allowed to enter the country at any point along the border, as they have been in their quest to reach countries further in the European Union.
"The legal option, the legal possibility to come to Hungary and therefore to the European Union through the Schengen borders is open, but the green borders, the natural borders of the country, are sealed," spokesman Zoltan Kovacs said in announcing the closure.
Schengen borders are the official crossings under Europe's Schengen Agreement, which eliminated border controls among many European Union countries.
"In order to be able to protect the Schengen borders and protect the Hungarian people, as well as Europe, we had to make that decision and (take) that step," Kovacs said.
Barriers raised to migrant entry
Last month, Hungarian riot police used tear gas and water cannons to turn people back at the border with Serbia. Hungary rushed to erect a razor-wire barrier to keep migrants out
, and threatened anyone crossing the fence with jail time.
Hungary's move comes as Europe struggles to fashion a coherent response to a historic wave of people fleeing conflict and destruction in the Middle East and North Africa -- primarily from Syria, where a civil war has raged for more than four years, claimed the lives of more than 200,000 people and left cities in ruins.
The closure of the Roszke border crossing between Hungary and Serbia last month caused thousands of asylum seekers
to try to travel through Croatia instead.
Hundreds of migrants had left the Croatian town of Tovarnik for the Hungarian border in September, according to the Croatian Interior Ministry. The main border crossing station between Hungary and Serbia later reopened.
Refugees from the Middle East made the final leg of their trip through Hungary on foot, walking the 4 kilometers (2.5 miles) to the Austrian border in the middle of the night, unsure of what was going to happen to them when they got there.
Europe is facing its largest refugee and migrant crisis since World War II.
People fleeing the violence in Syria account for the largest portion of those arriving on European shores, but there are many others on the move from African nations and elsewhere.
At least 475,000 migrants have crossed by boat into Europe seeking safety and sustenance so far this year, according to the International Organization for Migration. More than 2,800 have drowned or disappeared during the perilous journey.
At least 350,000 of the desperate travelers have landed in Greece, and more than 120,000 in Italy. From there, they try to reach the more sought-after EU nations for migrants, such as Germany and Sweden.
Germany is expecting 1 million asylum applications this year and has a backlog of more than 260,000 cases.
France has agreed to take tens of thousands and Britain 20,000. Switzerland said that if Europe can come to agreement, it will take 1,500 refugees. Most of Eastern Europe has resisted committing to a number.