The results were not unexpected, given the divisions of the opposition and the uneven playing field on which they were forced to compete. But they still alarmed Western officials who view Mr. Orban’s style of government as a threat to values such as the rule of law and a free press.
Mr. Orban’s victory is likely to embolden other leaders who have used a similar playbook, including those in neighboring Poland, where the governing party has openly emulated his tactics.
Mr. Orban built his campaign on castigating Western nations as a hostile, multicultural force, where Muslim immigrants ran wild and where traditional family values were under constant assault.
Instead of looking to France or Germany for inspiration, Mr. Orban has talked fondly of the autocratic systems of Turkey and Russia.
Still, Hungary is a member of the European Union and deeply reliant on the funds the bloc provides, especially for projects like building roads, bridges and other critical infrastructure.
As Mr. Orban systematically co-opted the tools of the state — from the courts to the schools to the electoral system itself — Brussels has proved unable to effectively pressure him to change course.
On Sunday, it was the voters who got their chance to have their say.
Under a brilliant blue sky on warm spring day, more than 70 percent of voters flocked to polling stations across Budapest, the grand capital city, with its stately boulevards lined with architectural treasures.
Across the country, it was a similar story, with thousands of voters waiting in line hours after the scheduled 7 p.m. end of polling to cast there two ballots — one for a national list of candidates and one for a local list.
Immigration was a major focus of the election, and throughout the day, state television replayed some of the most dramatic images from 2015, when the crisis of refugees and immigrants flooding into Europe from the Middle East and Africa was at its peak.
For Attila Boda, 48, an army reservist and dishwasher, the perceived threat to his country was persuasive. He cast his two ballots for Fidesz.
“We don’t want migrants to come to Hungary,” he said. “They are unwilling to integrate and they respect only their own laws. They want a war; they are brought to Europe by ISIS.”
Others expressed concern over the long-term consequences of Sunday’s vote.
Istvan Hegedus, the chairman of the Hungarian Europe Society, a research institute, was an early member of Fidesz, at a time when Mr. Orban was a firebrand champion of democracy after three decades of Communist rule.
But Mr. Hegedus left the party in 1994 and says he has watched with alarm as Mr. Orban has transformed himself from a centrist friend of the West into the leader of a crusade to create what Mr. Orban himself calls an “illiberal democracy.”
“At each step on this path, the European politicians have proven ineffective,” Mr. Hegedus said. “I think the mistake they made was they viewed him as an enfant terrible, but someone they could deal with. They convinced themselves that we know this man and that there is really nothing at stake.”
Sunday’s election, he said, was the best — and perhaps, last — chance for Hungary to change course.
Jozsef Peter Martin, the executive director of Transparency International Hungary, an anticorruption advocacy group, said the election was conducted on an unfair playing field. He compared the vote to playing soccer on a field set at a 45-degree angle.
“The whole institutional system is swayed to one party,” Mr. Martin said. From the state-controlled news media to the gerrymandering of electoral districts to favor Fidesz, an already fragmented opposition found it hard to compete, he said.
Under the current system, put in place in 2012, voters cast two ballots. One is for a national list, with parties awarded seats in Parliament based on the percentage of votes. That accounts for 93 of the 199 seats.
Newsletter Sign Up
Thank you for subscribing.
An error has occurred. Please try again later.
You are already subscribed to this email.
The rest are filled by the winners of local elections. This is where Fidesz holds the strongest advantage. In the 2014 election, Fidesz candidates were often able to win with as little as 40 percent of the vote because the opposition was split.
Nonetheless, in the closing days of this campaign, a grass-roots effort arose to promote “strategic voting.”
Using websites to help voters figure out which candidate had the best chance to defeat Fidesz, voters were encouraged to put their political loyalties aside to defeat the governing party.
Gergely Karacsony, the mayor of a district in Budapest and a leading opposition contender for Prime Minister, was placed at the head of an alliance between two left-wing groups — the Socialist Party and a Green party — in a partnership based more on need than political affinity.
Mr. Karacsony said that Mr. Orban had already largely “destroyed the constitutional order” and, in an interview before the election, he said he feared what an Orban victory would mean for the country.
Mr. Orban has cast himself as the only person capable of defending Hungary from threats seen and unseen. He has also tapped nationalistic sentiments by portraying officials in Brussels as meddling bureaucrats who are a threat to Hungary’s sovereignty.
As the election neared, his already caustic rhetoric took an even darker turn, vowing revenge on political enemies and demonizing immigrants.
“We do not want to be a multicolored country,” he said during a speech in February. If his point was not clear enough, he said that he did not want Hungarians to interact with immigrants “in such a way that our color is mixed with others’ colors.”
The United Nations High Commissioner for Human Rights, Zeid Ra’ad al-Hussein, denounced Mr. Orban’s remarks as racist.
“The security state is back and fundamental freedoms are in retreat in every region of the world,” Mr. Hussein said in a statement. “Shame is also in retreat. Xenophobes and racists in Europe are casting off any sense of embarrassment — like Hungary’s Viktor Orban.”
Edit Zgut, a foreign-policy analyst at Political Capital, a research organization based in Budapest, said Mr. Orban had proved effective at channeling public anger. Among the most frequent targets of Mr. Orban’s scorn has been George Soros, the American billionaire and philanthropist who was born in Hungary.
Ms. Zgut said that Mr. Orban’s attacks on Mr. Soros, and on the European Union and the United Nations, served a dual purpose: to channel the frustration of anti-establishment voters toward leaders in Brussels and to drive home his contention that migration is the driving factor behind Western accusations that his government was weakening the rule of law even as corruption spreads.
“If he portrays Brussels and the E.U. as the enemy of the state, his voters might consider the E.U.’s criticisms of the government as part of a broader conspiracy that questions the sovereign decisions of Hungarians,” she said. “This is why he keeps repeating that this clash between Brussels and Hungary is all about migration.”
In the weeks leading up to the election, however, it was not concern about the erosion of the rule of law that most galvanized opposition voters. It was corruption, with several high-profile associates and government officials entangled in a variety of scandals involving the alleged looting of state resources.
In addition to local press reports, the European Union’s anti-corruption agency, OLAF, released a report in January alleging that a company controlled by Mr. Orban’s son-in-law regularly received huge sums of EU development funds.
Zoltan Kovacs, a government spokesman, dismissed groups like Transparency International as tools of those determined to bring down the government.
“Corruption allegations are the only tool the opposition has,” he said.
He pointed to the strong economy — the World Bank has projected a 3.9 percent growth rate for Hungary this year — as evidence that Mr. Orban’s system was working to the benefit of the people.
That economic growth, however, did not persuade Ilona Kovacs, 73, a retired English teacher, from voting against Mr. Orban.
“I don’t like the local candidate I voted for, but I had to, I had no choice,” she said, noting she cast her ballot for the only candidate with a chance of defeating the local Fidesz politician.
“I want to stop the corruption,” she said, adding that Mr. Orban’s “anti-migrant and anti-Soros speech is unbearable.”
An Orban victory, she feared, would mean that “they will continue to destroy our democratic institutions, everything will be theirs.”
“I had dreamed, that in my old age, there would be better days ahead,” she said. “But now I feel like my soul is on fire.”