Europe's migration crisis is exposing the deep divisions that exist within the European Union, which European federalists have long hailed as a model for post-nationalism and global citizenship. Faced with an avalanche of migrants, a growing number of EU member states have moved decisively to put their own national interests above notions of EU solidarity.

Hungary's parliament, for instance, has approved the construction of a massive border fence with Serbia as part of a new anti-immigration law that also tightens asylum rules.

The move is aimed at stopping tens of thousands of migrants from Africa, Asia and the Middle East from entering Hungary, which has become a key gateway for illegal immigration into the European Union.

Hungarian officials say drastic measures are necessary because of the EU's inaction in the face of an unprecedented migration crisis, which has seen more than 150,000 migrants cross into Europe during the first six months of 2015. More than 715,000 people have applied for asylum in the EU during the past twelve months.

Hungarian lawmakers on July 6 voted 151 to 41 in favor of building a 4-meter-high (13-foot) fence along the 175-kilometer (110-mile) border with Serbia. The measure aims to cut off the so-called Western Balkan Route, which constitutes the main land route through Eastern Europe for migrants who enter the EU from Turkey via Greece and Bulgaria.

More than 60,000 people have entered Hungary illegally during the first six months of 2015, a nearly 900% increase over the same period in 2014, according to Frontex, the European border agency. Approximately 95% of the migrants entering Hungary — most coming from Afghanistan, Iraq, Syria, Somalia and Kosovo — cross into the country from Serbia, which unlike Hungary is not a member of the EU.

Hungary forms part of the EU's passport-free Schengen zone, which means that once migrants are inside the country, they can travel freely throughout most of the rest of the EU without further border checks.

In 2014, Hungary received more refugees per capita than any other EU country apart from Sweden. Although most of the migrants entering Hungary continue onward to wealthier countries in Western Europe, a growing number of refugees are deciding to stay in Hungary. During the first three months of 2015, Hungary received the largest number of asylum requests as a share of population of any EU member state.

Hungarian Foreign Minister Peter Szijjarto has justified the moves as necessary to defend his country. "The Hungarian government is committed to defending Hungary and defending the Hungarian people from the immigration pressure," he said. "Hungary cannot allow itself to wait any longer. Naturally, we hope there will be a joint European solution."

Critics say the decision to build a fence evokes memories of the Cold War, when Europe was divided between East and West. "We have only recently taken down walls in Europe," said the EU's spokesperson for migration, Natasha Bertaud. "We should not be putting them up."

An unnamed European diplomat told the Telegraph newspaper: "This is a scandal. Hungary, which was the first Communist country to dismantle the Iron Curtain, is now building a new curtain on its southern border."

Hungarian Prime Minister Viktor Orban has pointed to the big picture consequences of untrammeled immigration from Muslim countries. Speaking at a conference in honor of former German Chancellor Helmut Kohl, who recently turned 85, Orban warned that the influx of so many migrants was threatening "the face of European civilization" which "will never again be what it is now." He added: "There is no way back from a multicultural Europe. Neither to a Christian Europe, nor to the world of national cultures."

Hungary is not the only EU country that has been building or fortifying walls and fences to keep migrants out.

Bulgaria has built a 33-km (21-mile), three-meter-high (10-foot) barbed wire fence along its border with its southeastern neighbor Turkey in an effort to limit the influx of migrants from Syria and other parts of the Middle East and North Africa. The Interior Ministry has also deployed more than one thousand police officers to patrol the Turkish border.

Greece has erected a 10.5-km, four-meter-high barbed-wire fence along part of its border with Turkey. The Greek wall is said to be responsible for diverting migration routes toward neighboring Bulgaria and, consequently, for construction of the wall there.

Spain has fortified fences in the North African exclaves of Ceuta and Melilla as record numbers of migrants are jumping over the barriers from neighboring Morocco. Border police registered more than 19,000 attempts to jump the fence at Melilla in 2014, up 350% on 2013, according to the Interior Ministry. Nearly 7,500 migrants successfully entered Ceuta and Melilla in 2014, including 3,305 from Syria.

The UK is setting up more than two miles of nine-foot-high security fencing at the Channel Tunnel port of Calais in northern France, in an attempt to stop thousands of illegal migrants breaking into trucks bound for the UK. Currently, more than 3,000 migrants are camped in and around Calais hoping to make it to Britain. More than 39,000 would-be illegal immigrants wereprevented from crossing the Channel in the 12 months prior to April, more than double the previous year.

EU member states are implementing other emergency measures to halt the flow of immigration.

Austria has stopped processing asylum claims as of June 13, in an effort to make the country "less attractive" for migrants relative to other EU countries. According to Austrian Interior Minister Johanna Mikl-Leitner, Vienna was "stopping the Austrian asylum express," whereby applications are processed within an average period of four months, faster than in any other EU country. Asylum requests for Austria rose nearly 180% in the first five months of 2015 to 20,620, and were on track to reach 70,000 by the end of the year.

Denmark on July 1 announced that it would slash benefits for asylum seekers to bring down the number of refugees coming to the country. It recently emerged that three out of four refugees who came to Denmark in the early 2000s are jobless ten years later.

France and Italy have sparred over who is responsible for hundreds of African migrants stranded at Ventimiglia on the France-Italy border after French police refused to let them in. France accused Italy of failing to respect the so-called Dublin Regulation, a law that requires people seeking refuge within the EU to do so in the first European country they reach. Italian officials argued that the migrants see Italy as only a transit country.

Hungary on June 23 suspended its adherence to the Dublin Regulation, which requires Hungary to take back refugees who have travelled through the country to reach other EU countries.

Meanwhile, the European Commission, the EU's powerful bureaucratic arm, on May 27announced a controversial "relocation plan" that would require EU member states to accept 40,000 Syrian and Eritrean asylum seekers from Italy and Greece over the next two years.

This is in addition to a separate "resettlement plan" to distribute 20,000 refugees, mostly from Iraq and Syria, who are currently living in camps in the Middle East.

The proposal to "share" migrants among EU member states is aimed at easing the growing burden on Italy and Greece, two countries that — in addition to Hungary and Spain — have emerged as the main gateways for migration into Europe.

Many say that decisions about the granting of residence permits should be kept at the national level, and that by unilaterally imposing migrant quotas on EU member states, unelected bureaucrats in Brussels are seeking to force the democratically elected leaders of Europe to submit to their diktat.

European leaders meeting in Luxembourg on July 9 were unable to reach a consensus on the quota proposal. They will try again on July 20.

Austria, Germany and Sweden, which together take in the largest share of the refugees along with Italy and Greece, are in favor of the quota plans. Belgium, France, Spain and the countries of Eastern Europe and the Baltics are opposed. The UK, Denmark and Ireland are exempted from the plan.

Hungary's Prime Minister Orban summed it up this way: "The proposal on the table from the European Commission is absurd, bordering on insanity. Quotas are only going to bring more people to Europe. It is an incentive for human traffickers and will simply tell people: yes, try to cross the Mediterranean at all costs."

Soeren Kern is a Senior Fellow at the New York-based Gatestone Institute. He is also Senior Fellow for European Politics at the Madrid-based Grupo de Estudios Estratégicos / Strategic Studies Group. Follow him on Facebook. Follow him on Twitter.

This article appeared originally on GatestoneInstitute.org