Lawmakers also approved a proposal facilitating the government's plan of building a 13-foot-high fence on the border with Serbia to stem the flow of migrants and refugees.
The government said last week that construction of the temporary fence, initially to be built in about 10 locations where officials said human traffickers were the most active, would start within weeks and be completed in a few months.
“Economic migrants should be stopped at the borders of Hungary and, therefore, Europe,” Fidesz faction leader Antal Rogan said ahead of the parliamentary vote. “There is no good solution to this issue other than setting up the security border seal,” which is what the government officially calls the fence.
Nearly 72,000 migrants have reached Hungary so far this year, nearly all entering through the border with Serbia. Last year, just under 43,000 people filed for asylum in Hungary, though most quickly leave for Germany and other destinations further west in the European Union before their petitions are resolved.
The landlocked central European country of 10 million people is part of the European Union's visa-free Schengen Area and thus an attractive destination for tens of thousands of migrants entering Europe via the Balkans from the Middle East and Africa. Most then move on to wealthier western Europe.
Janos Lazar, of the prime minister's office, said the 110-mile, Cold War-style fence, plans for which were first announced last month, would be a temporary measure and was not directed in any way against Hungary's southern neighbor.
“Hungary needs Serbia as an ally, we want to keep this alliance and strengthen it,” Lazar told a news conference. “We will raise this barrier on the border on a temporary basis in the hope that Europe manages to find a definitive solution to this issue soon.”
The EU faces a wider migrant crisis, highlighted by the drowning of hundreds of people trying to reach its shores by crossing the Mediterranean, and is struggling to find ways of shouldering the burden between its 28 member states.
The Hungarian fence, which has angered Serbia and also drawn criticism from the United Nations refugee agency, is estimated to cost between $18 million and $36 million.
Hungary's Prime Minister Viktor Orban, under pressure to stem a loss of public support to the far-right Jobbik party, has said Hungary's borders should be defended by all means. His government has put up billboards telling immigrants to respect the country's laws.