Opponents of Hungary's new labor law demonstrate in front of the Parliament building in Budapest in December.Leonhard Foeger / AP

BUDAPEST—Viktor Orbán has found himself in something of a bind: Hungary’s growing economy has given him cover to dismiss his detractors, who rail against his moves to weaken the country’s institutions and his anti-immigrant rhetoric. But that same economic boom, paired with a dearth of workers—both homegrown and from abroad—is counterintuitively uniting a political opposition against him.

Orbán has been criticized for what critics say has been his authoritarian dismantling of democratic institutions, as well as for his stance against immigrants. But he has consistently been able to fend off opponents, thanks in large part to Hungary’s economy: The country’s gross domestic product has been growing at an annual rate of more than 4 percent for most of the past two years, unemployment has fallen to a low of 3.6 percent from 11 percent in 2010, and Orbán has enticed foreign companies such as BMW, Daimler, Samsung, and others to build factories here.

At the same time, though, Hungarian workers have continued to move out of the country in search of higher wages abroad. As many as 600,000 Hungarians—equivalent to around 9 percent of the working-age population—work outside of Hungary, and Orbán’s refusal to countenance immigrants filling the void has only made this shortfall more acute. In December, the government rushed legislation through Parliament to try to address this shortage. The new measures give businesses the right to require employees to work up to 400 hours of overtime a year, nearly twice as much as was previously allowed, and demand only that employers pay for that overtime at some point within three years. Simply put, employers can make their employees work more, and not have to pay them until later. The government maintains that these overtime hours remain voluntary and at the discretion of the employee, but many workers and trade unions argue that they have little choice in the matter.

Outrage over what has been labeled the “slave law” has sparked protests across the country and has united a fractured opposition against Orbán. A broad anti-government movement has swept the country, with thousands of Hungarians taking to the streets in the past several weeks (interrupted only by the holiday lull). Student groups, unions, and labor organizations have promised to go on strike in the coming days. The uproar may not topple Orbán or oust his Fidesz party from government, but Hungary’s prime minister now faces the most sustained popular movement against him since he took office in 2010.

“It is not about party politics,” Peter Ungar, a Green Party MP from western Hungary, told me. “It is about the 500,000 workers who will be affected by this new law.”

The persistence of the mounting opposition movement against Orbán has significance beyond Hungary’s borders. Orbán has served as a model for nativists the world over for his anti-immigrant rhetoric and his refusal to accept the European Union’s “migrant quotas”—an attempt by European officials to evenly distribute refugees fleeing to the continent across the bloc’s 28 member states. Steve Bannon, Donald Trump’s former chief strategist, has praised Orbán as “heroic” and has promised to “spend a lot of time in Hungary” before European Parliament elections in May, while the far right, from internet trolls to Representative Steve King of Iowa, praise Orbán as a nationalist visionary in web forums, blogs, and videos.

When I visited Budapest just after the law was officially signed last month, thousands marched from the Parliament building on the Danube across the river to Buda Castle, once the home of Hungarian kings and now a symbol of the country’s history. By then, protests had been running almost nonstop for three weeks. Demonstrators eagerly shouted “Orbán egy géci!”—a chant that calls Orbán a swear word and that inspired the shorthand of the movement: #O1G. One placard read Sex, Drugs, and Overtime, while another poked fun at Orbán’s spending of EU funds on the construction of a train line, famed for its low passenger rate, that transports riders a grand total of six kilometers, from Orbán’s small, central-Hungarian hometown to a neighboring village. Roughly translated, the poster read: Roses are red / Violets are blue / There’s no brakes / On this Orbán choo-choo. In an emailed statement to The Atlantic, a Hungarian government spokesperson denied that any EU funds were misused and blamed the protests on various outside forces.

In recent years, the Hungarian leader has successfully circumscribed the media and single-handedly rewritten the constitution to cement his political control (with more changes promised). His government has also stacked previously independent institutions with loyal allies—another law passed in December allows the justice minister to handpick judges in administrative courts, drastically hindering judicial independence. Orbán’s election victory last year gave him a new mandate and renewed momentum to push his agenda. Opposing political parties were weak and fractured, and any popular protest attempts to challenge him had been sporadic and ineffective. The “slave law” appears to have changed that dynamic, though, highlighting not only Orbán’s intransigence when it comes to allowing in immigrants, but also the few levers available to his government to address the labor shortage.

To some extent, Orbán’s reliance on economic growth to counter his opponents is itself a dangerous strategy. While wages have been slowly increasing, partly thanks to economic growth and partly because of the labor shortage, the average Hungarian still makes only barely half that of the average person in Austria, a country that shares a border with Hungary (and that, a century ago, shared an empire). There are also reports that while Hungary’s overall economic indicators are improving, unemployment figures in particular appear to be buffeted by a state-run public-works program that employs large numbers of people.

“The labor market is one of the many houses of cards in this country,” said Ákos Hadházy, a former member of Orbán’s Fidesz party who is now an independent opposition MP. “It seems good but is guaranteed to collapse.”

Hadházy argued that the “slave law” has failed to address the core issue affecting Hungary’s labor market—that wages are too persistently low to keep Hungarians from migrating abroad, a sentiment echoed by union leaders and economists I spoke with. As an EU member state, Hungary is part of the region-wide labor market, meaning a Hungarian can travel elsewhere in the bloc to find better work, and higher pay, without requiring a visa. Orbán’s government has attracted thousands of people through an investor visa program, but its unwillingness to accept workers from outside Europe has hindered its overall ability to address the shortfall of employees.

Other countries have turned to immigration to address labor shortages. In fact, Hungary is not alone among Central European countries in facing such a problem. Poland, like Hungary, has vocally opposed the EU’s migrant quotas, for example, yet it has brought in thousands of Ukrainian workers fleeing that country’s conflict. And still, Mateusz Morawiecki, Poland’s prime minister, suggested in July that he would consider relaxing the country’s opposition to immigration, telling reporters, “If there is a demand on the labor market which Poles are unable or unwilling to meet, we need to take up the challenge so that we maintain our economic growth.”

For Orbán, though, the anti-immigrant stance is among his calling cards, the policy for which he is best-known. In his first news conference of the year, instead of the protests, he focused on immigration, calling for a new “anti-immigration axis” with other Central and eastern-European countries, as well as with Italy.

And even in the face of these demonstrations, Orbán shows no signs of backing down. In a statement released this month, Istvan Holik, a Hungarian government spokesperson, pinned the blame for the protests on a host of foreign actors.“These protests are being organized with George Soros’s money,” Holik said into a camera, evoking the philanthropist billionaire who is frequently an Orbán propaganda target, “so that they can turn Hungary into an immigrant country.”

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.