Hungarian police in riot gear are trying to stop migrants from breaking out of a border camp in Roszke, near Serbia, on September 4, 2015. REUTERS/Marko Djurica

Article 2 of the European Union’s governing treaty declares that the E.U. is founded on “respect for human dignity, freedom, democracy, equality, the rule of law and respect for human rights, including the rights of persons belonging to minorities.”  That declaration is being tested with the recent migration wave—and nowhere more so than in Hungary, whose leader appears to be using the crisis to expand the state’s autocratic powers, right in the heart of the E.U.

What is Viktor Orbán up to now?

Hungary’s Prime Minister Viktor Orbán has made a series of controversial speeches depicting the refugees as a Muslim threat to Europe’s Christian civilization. His government has left refugees on muddy fields near the Serbian border and on the streets of Budapest and forced others into detention camps with abysmal conditions. Thousands have trekked along the highway to Austria.

[Five things you need to know about the European migrant crisis]

Orbán rejects criticism of his policies on migrants, claiming that he is simply attempting to enforce E.U.rules. However, his rhetoric and his policies are at odds with the spirit and likely the letter of E.U.rules on the humane treatment of refugees.

Orbán’s government may be deliberately twisting E.U.rules as part of his campaign to make populist appeals while actually restricting his nation’s democracy. Earlier this month, Orbán pushed a new immigration law through Parliament that established new crimes for damaging or simply crossing a border blockade, such as the new razor-wire fence Hungary has erected on the border with Serbia. This move criminalizes most refugees entering the country. The law also empowered the government to declare a “state of migration emergency” which it has just done. Under that state of emergency, the government is promising to quickly arrest or deport most migrants. Later this month the Hungarian Parliament will consider further expanding the powers of the police and armed forces during a migration emergency.

Orbán’s reaction to the refugee crisis is only the latest of his regime’s challenges to the European Union. Since Orbán’s Fidesz party swept to power in Hungary in 2010 with a parliamentary supermajority, his government has managed to eliminate previous constitutional checks and balances, undermine the independence of the judiciary, diminish media pluralism, and introduce a new electoral system that favored his party and helped him retain power in the 2014 elections. He has declared his rejection of liberal democracy in favor of an “illiberal state” modeled on Russia, China and Turkey. He has cultivated ties with Russian President Vladimir Putin, pursuing energy deals with his regime that were in tension with E.U. policy.

How is Orbán getting away with edging toward autocracy within the E.U.?

Hungary’s slide away from liberal democracy under Orbán has caused consternation in Brussels, but E.U. efforts to control the Orbán regime have proven mostly ineffectual. The European Commission has brought a series of infringement actions against Hungary targeting specific violations of E.U. law; the European Parliament has issued a highly critical report and taken votes condemning the Hungarian government’s actions. These actions have done little to deter Orbán, who depicts political criticism of him as either a politically motivated attack by leftists or simply as unwarranted E.U. meddling in Hungary’s domestic affairs.

The E.U.’s difficulties in confronting the Orbán regime raise doubts about the union’s ability and willingness to uphold its core values when they are threatened by a member government. This has led some observers such as Jan-Wener Müller to ask whether we might be witnessing the rise of an authoritarian regime inside the E.U.  This might seem like a shocking possibility: How could it be that a union that sets democracy as an explicit condition for membership would tolerate the slide to autocracy of one or more of its member states? However, a body of research in comparative politics suggest that we should not be surprised.

Orbán is not alone. Authoritarian states commonly nestle within democracies.

As I point out in a recent paper, within states that are democracies at the national or federal level, authoritarian regimes commonly persist at the state or provincial level. As Northwestern University scholar Edward Gibson puts it, “Subnational authoritarianism is a fact of life in most democracies in the developing and postcommunist world. It was also a massive fact of U.S. political life until the unraveling of hegemonic party regimes in the South in the middle years of the twentieth century.” If authoritarian and quasi-authoritarian state governments can persist within national democracies, they can survive in the less centralized, supranational, and highly heterogenous European Union.

[Is Hungary run by the radical right?]

The comparative literature shows what type of authoritarian state regimes are likely to emerge in democratic federations. They are not likely to be particularly repressive, classic authoritarian regimes, but rather hybrid regimes that scholars sometimes refer to as competitive authoritarianisms or illiberal democracies. Their leaders avoid blatantly authoritarian practices that might prompt federal (or in the E.U.’s case supranational) intervention. Instead, as Argentine political scientist Carlos Gervasoni notes, they typically “resort to subtle means to restrict democracy. Elections are held and ballots are counted fairly, but incumbents massively outspend challengers; the local media are formally independent but are bought off to bias coverage in favor of the ruling party; dissidents are not jailed, just excluded from coveted public jobs.” Critics of the Orbán regime accuse it of using precisely such techniques.

Why do pockets of state-level authoritarianism persist within democratic federations? Party politics. If authoritarian state leaders are part of governing coalitions at the federal level, federal leaders may overlook how those leaders run their states.

What factions within the E.U. are protecting Orbán from censure?

That’s what’s happening between Hungary and the E.U. Orbán’s Fidesz party is a member of the European People’s Party (EPP) – the center-right faction in the European parliament. Leading figures in the EPP have long tolerated the Orbán regime’s violations of democratic values and sheltered it from censure in the interest of party loyalty and of maintaining their majority in the European Parliament.

For example, in July 2013, the European Parliament’s Committee on Civil Liberties, Justice and Home Affairs issued a report criticizing the erosion of fundamental rights in Hungary. But EPP vice-chair Manfred Weber (now party chair) dismissed that as a politically motivated attack by leftist parties. In March 2014, EPP President Joseph Daul endorsed Orbán’s reelection at a Fidesz campaign rally in Budapest. In June 2015, the European Parliament passed a resolution condemning Orbán’s statements on the death penalty and his “consultation” on migration—but only parties of the Left voted in favor, while the EPP leadership publicly defended the Orbán government.

While EPP leadership has defended Orbán, their left-of-center counterparts can’t provide Hungary’s weak, beleaguered opposition the help they need. E.U. regulations make it illegal for E.U. level political parties to fund national parties. Even were that not true, providing the opposition with the material support they would need to overcome the challenging conditions they face in Orbán’s Hungary would likely be perceived as illegitimate meddling in domestic political affairs. Thus the E.U. finds itself stuck in what I have labeled an “authoritarian equilibrium:” with just enough partisan politics for European parties to shelter national autocrats, but not enough partisan politics to topple them.

Critics have long argued that the E.U. suffers from a “democratic deficit” and that growing E.U. power undermines national democracy. But conditions in Hungary suggest that the greatest democratic deficits in Europe may lie at the national level. Unless European leaders from across the political spectrum agree to apply political and economic pressure on Orbán, he will likely continue consolidating his illiberal autocracy.

Daniel Kelemen is professor of political science and law at Rutgers University.