BUDAPEST — Many thousands of Hungarians, their winter coats zipped tight against a freezing rain, marched through central Budapest on Saturday, voicing anger at their right-wing government and showing that resistance remains alive in a country where it had appeared all but dead.

The protest extended into a second month — and a new year — a campaign emerging as one the most serious challenges yet to the authority of Viktor Orban, the four-term prime minister. 

“Resign! Resign!” demonstrators chanted as a column of marchers stretching many city blocks made its way along Andrassy Avenue, the city’s grand central boulevard. By late afternoon, the crowd had filled the sprawling plaza in front of the Hungarian Parliament, near the banks of the Danube.

Orban has helped pioneer a breed of autocracy in a country that threw off the shackles of communist authoritarianism three decades ago, and he serves as inspiration for other hard-line leaders in Europe and beyond. 

His authority in Hungary is normally unquestioned. The political opposition is divided and leaderless, civil society is hemmed in by punishing laws, much of the media is in his pocket and supposedly independent branches of the government are beholden to the ruling party. 

In elections in April — deemed free but not fair by independent observers — Orban won a two-thirds parliamentary majority that gives him license to change the constitution at will.

Yet Saturday’s protest offered fresh evidence that Orban — normally sure-footed in keeping the public on his side — may have erred with recent moves that have provoked a backlash more intense and sustained than any in recent years. 

“After the election, we had apathy. But then something changed,” said Bernadette Szel, an independent lawmaker who has helped spearhead the protests. “This is fake democracy and people are fed up with it.” 

Among the factors driving the unrest are the eviction of Central European University, the creation of a parallel justice system that will allow the government to bypass independent courts and the dead-of-night removal of a statue that paid tribute to a hero of the failed 1956 anti-Soviet uprising.

But the most important trigger for the demonstrations was legislation, jammed through the parliament last month with little debate, that allows employers to force workers to perform as many as 400 hours of overtime per year. Employers can delay payments for up to three years. 

The workplace code, dubbed “the slave law” by opponents, was the government’s response to an ultratight labor market that has left employers struggling to find workers. Orban has been highly successful in attracting major European firms to Hungary, using low wages to cement the country’s reputation as the continent’s factory floor.

But hundreds of thousands of people have abandoned Hungary, seeking higher pay and greater freedoms elsewhere. The workers who are left behind are increasingly chafing under the strain.

“The workers are already exhausted by the amount of work they’re doing. The new law makes it even worse,” said Bela Balogh, president of the Hungarian Metalworkers Federation.

Balogh’s union was among a number of workers groups out in force on Saturday. The unions have threatened more protests, as well as strikes, in the weeks to come. 

Alongside the unions, civil society groups and a motley collection of opposition parties — from left to right — have been the primary drivers of the demonstrations, which began with a series of protests last month.

The largest of December’s protests numbered around 15,000 demonstrators. Saturday’s event appeared to have at least matched that total, and it may have exceeded it.

Government spokesmen have dismissed the demonstrators as agents of George Soros, the Hungarian American financier and the prime minister’s all-purpose boogeyman

“Today’s rally is part of the election campaign of George ­Soros for the European parliament,” said Balazs Hidveghi, a spokesman for the ruling Fidesz party, at a news conference. “He wants to import a pro-migration agenda. Therefore, he’s activating his supporters everywhere.”

Orban has cast himself as the patriotic defender of Hungary against an invading tide of migrants, even though immigration to the country is negligible. With European parliamentary elections coming up in May, he has sought to transform the campaign into a struggle between his brand of “illiberal democracy” and the tolerant and open societies advocated by Soros.

Opinion surveys suggest Orban and Fidesz remain popular in Hungary, with especially robust support in the countryside and in small cities. Balogh, the union leader, acknowledged that many of his members support the government and agree with its argument that the labor law will help them up their earnings.

“In the countryside, where the majority of our membership lives, people believe what the government tells them. They don’t have access to independent media,” he said. 

While Orban has gone to great lengths to commandeer the press, he has resisted using brute force to suppress dissent. Analysts say he prefers a light-touch style of autocracy that allows him to wield virtually unfettered power without resorting to cracking heads. 

But the recent demonstrations have tested Orban’s approach. The police used tear gas last month to fend off protesters who were trying to force their way into the parliament. Security guards later forcibly evicted several opposition lawmakers from the state television headquarters, sending one to the hospital.

“This is showing people the real face of their power. Not the mask. The real face,” said Szel, who was among the parliamentarians roughed up.

Saturday’s protest unfolded peacefully, with police blocking off large sections of the city center to allow demonstrators to march. After nightfall, protesters chanted “We’ve had enough!” as riot police circling the parliament building looked on impassively.

Demonstrators said they were demanding free courts, a free media and a repeal of the labor law. But mostly, the protests have become a catchall for everyone uneasy with the direction in which Orban has led the country since returning to power in 2010. 

“Orban is not taking us forward or left or right but backward into the darkest times of our history,” Julia Abraham, an organizer of a civil society group called Hungary for Everyone, told the crowd. 

That fear was made vivid late last month by the cover-of-darkness removal of a statue that had stood beneath parliament’s soaring spires. The statue depicted former prime minister Imre Nagy, a hero to many Hungarians for his role in supporting the 1956 uprising. 

But Orban’s government evidently did not want a figure associated with resistance to a despotic regime gracing the country’s central public square. 

The statue will be replaced by a memorial to the victims of a 1919 purge of anti-communist forces. The memorial had previously occupied that spot under the regime of Adm. Miklos Horthy, a right-wing authoritarian who led Hungary during the interwar years and who, according to historians, appears to be a model for Orban’s reign.

“The Horthy era was quite similar to the Orban system,” said Janos Rainer, a Nagy biographer who heads the Budapest-based 1956 Institute. “A nationalist public discourse. Fully controlled media. A strong governmental party. Most of all: democratic structures, but no democratic procedures.” 

Gergo Saling contributed to this report.