BRUSSELS — European lawmakers voted Wednesday to initiate sanctions proceedings against the Hungarian government for what they said was backsliding on democracy, an extraordinary censure for a nation that was once a beacon of post-Communist transformation.

The measure, which required a two-thirds supermajority of the European Parliament to pass, declared there was a “clear risk of serious breach” of European values by Hungarian Prime Minister Viktor Orban. It was the first step in a process that could ultimately strip Hungary of its voice in decision-making in the European Union.

The decision creates head winds for Orban’s ambitious quest to remake the continent in his model of “illiberal democracy” — a bloc that would be closer to Russia, less open to migration, and less concerned about independent judiciaries, a free press and minority rights.

The vote on the proceedings, known as Article 7 after a provision in the E.U. treaties, was welcomed by Orban’s increasingly besieged foes inside Hungary, who saw it as their final hope to preserve democratic values at home, and his critics across Europe.

“The alt-right in Europe is trying to undermine this European Union,” Guy Verhofstadt, a Belgian member of the European Parliament, said ahead of the final tally. “And it is, in fact, trying to take over European politics from within.”

Despite the vote’s symbolism, however, it is probably too late for Orban’s critics to succeed in blocking Hungary’s E.U. voting rights or win major concessions from him. Orban has teamed up with Poland, another E.U. country that has been slapped for rule-of-law problems, to protect each other against punitive measures targeting either nation that require the unanimous vote of all 28 E.U. countries.

The gravity of the measure was reflected in the supermajority necessary to pass it onward to E.U. for further study. It passed with 448 lawmakers in favor, 197 against.

Hungarian Foreign Minister Peter Szijjarto called the vote the “petty revenge of pro-immigration politicians” and said Hungary would fight it.

Orban on Tuesday castigated European lawmakers in a fiery speech at the parliamentary chambers in Strasbourg, France, saying, “Hungary is going to be condemned because the Hungarian people have decided that this country is not going to be a country of migrants.”

He said Europe had no right to interfere in the actions of a sovereign government.

“Hungary will not accede to this blackmailing. Hungary will protect its borders, stop illegal migration,” he said, “and if needed we will stand up to you.”

Orban, who has been elected four times and now presides over what is effectively a one-party state, has been a thorn in the side of E.U. leaders since he came back to office in 2010. He cracked down on media freedoms, rewrote laws to favor his center-right Fidesz party and has blasted Brussels for allowing a wave of more than 1 million migrants into Europe in 2015.

When Orban began consolidating power after his 2010 election victory, he was largely the only leader in the E.U. promoting what he calls his “illiberal” platform. Since then, far-right politicians have gained ground across the continent, including in Italy, where they are in government, and in Sweden, where an anti-immigrant party won its best result to date in elections on Sunday.

Along the way, Orban has been shielded by his alliance with fellow center-right European leaders as part of the European People’s Party, an arrangement that gives them control of the European Parliament and, other leaders have said, more sway over his moves at home.

The partnership has created increasing uneasiness as leaders who portray themselves as defenders of liberal European values, including German Chancellor Angela Merkel and Dutch Prime Minister Mark Rutte, have found themselves covering for Orban as he cracks down on civil society and the free press.

Wednesday’s vote was the first sign of a split, with 115 lawmakers from that party voting against Hungary and only 57 defending it. Manfred Weber, the German leader of the European People’s Party and an influential voice in the debate, said Tuesday night he had had enough.

“The values of the European Union are not negotiable for us,” Weber said. “We had enough dialogue.”

The vote in Strasbourg was closely watched in Hungary by the people and institutions that have been the targets of increasingly repressive moves by Orban’s government.

The vote was seen as a possible last chance to put a brake on Orban’s most illiberal behavior, which has included criminalizing the work of nongovernmental organizations that assist refugees and an attempt to oust a renowned university.

“If there isn’t a clear signal from the European Parliament, then we have a very tough few months ahead of us,” said Marta Pardavi, co-chair of the Budapest-based Hungarian Helsinki Committee, who traveled to Brussels last week to lobby lawmakers to vote for the sanctions.

“I told them, ‘Right now, I am sitting with you talking. But six months down the line, I might be sitting with you in prison.’ I think that was important for them to hear,” she said.

Pardavi’s organization, which advocates on behalf of refugees and other marginalized groups, is among those that could be punished under legislation passed in June that makes it illegal for individuals or groups to help undocumented immigrants gain asylum.

Also watching the vote carefully were professors, students and administrators at Central European University, a U.S.- and Hungarian-accredited institution in Budapest. It could be forced into exile in the coming months, the culmination of a year-and-a-half campaign by the government to discredit it.

Michael Ignatieff, the university’s president, said the vote could be a key moment in determining whether the university gets to stay. It was also, he said, a critical choice for conservative leaders across Europe who have advocated for CEU but who had, at least until Wednesday, also sought to avoid alienating Orban.

“European conservatism has a very honorable tradition of supporting the rule of law and academic freedom,” said Ignatieff, a human rights scholar and former Canadian politician. “This is when European conservatism defines itself.”

Witte reported from Budapest. Quentin Ariès in Brussels contributed to this report.