ROZDROJOVICE, Czech Republic — Marie Malenova, a Czech pensioner in a tidy, prosperous village in South Moravia, had not voted since 1989, the year her country held its first free elections after more than four decades of communist rule.
Last Friday, however, she decided to cast a vote again, an event so unusual that her disbelieving family recorded her change of heart, taking photographs of her slipping her ballot into a big white box at the village hall.
She said she did not much like the people she voted for, a coalition of previously divided center-right parties, describing them as “a smaller evil among all our many thieves.” But they at least had a simple and clear message: We can beat Andrej Babis, the Czech Republic’s populist, billionaire prime minister.
“I wanted a change,” Ms. Malenova said, “and I wanted something that could beat Babis.”
For the past decade, populists like Mr. Babis have often seemed politically invincible, rising to power across Central and Eastern Europe as part of a global trend of strongman leaders disdainful of democratic norms. But on Saturday, the seemingly unbeatable Mr. Babis was defeated because opposition parties put ideological differences aside and joined together to drive out a leader they fear has eroded the country’s democracy.
Their success could have major repercussions in the region and beyond. In Hungary and in Poland, where nationalist leaders have damaged democratic institutions and sought to undermine the European Union, opposition leaders are mobilizing, trying to forge unified fronts and oust populist leaders in upcoming elections.
“Populism is beatable,” said Otto Eibl, the head of the political science department at Masaryk University in Brno, the South Moravian capital. “The first step in beating a populist leader is to suppress individual egos and to compromise in the interest of bringing a change.”
The biggest showdown could come in Hungary, where Prime Minister Viktor Orban has promoted himself as Europe’s standard-bearer for “illiberal democracy,” while his Fidesz party has steadily stripped away democratic checks, squeezing independent media and the judiciary. Mr. Orban has staked out right-wing political positions — including hostility to immigration, the European Union and L.G.B.T.Q. rights (if also proving adept at adopting left-wing welfare policies) — that have been emulated by his allies in Poland, the governing Law and Justice party.
In recent years, champions of liberal democracy have been confounded in their efforts to battle their way back into power against nationalist leaders skilled at stoking fear and presenting themselves as saviors. Faced with well-oiled and well-financed political machines, like Mr. Orban’s Fidesz party or Mr. Babis’s party, Ano, opposition forces have been notoriously divided — until now.
This weekend, six Hungarian parties will complete a weekslong opposition primary race, the first of its kind, to whittle down the list of potential contenders in every electoral district to oppose Mr. Orban’s party. The coalition includes groups ranging from nationalist conservatives to leftists, who disagree on most things but share a fervent desire to dispatch Mr. Orban.
In Poland, Donald Tusk, a former prime minister and a former president of the European Council, tried to rally the main opposition party and people who often do not vote, and also tried lure support from a plethora of other opposition groups.
The appeals for opposition unity have also been evident in Russia, where parliamentary elections held last month were neither free nor fair. Allies of the jailed opposition leader Aleksei A. Navalny had been trying to persuade voters to rally behind a single opposition candidate in each constituency, whether they liked the candidate or not, in the name of trying to win a single seat and breaking President Vladimir V. Putin’s complete stranglehold on power.
It did not work — partly because most real opposition candidates were kept off the ballot, but also because Mr. Putin’s government pressured companies to remove a “smart voting” app that the opposition was using to coordinate its campaign.
Like Mr. Putin, Europe’s populist leaders claim to be defending traditional Christian values against decadent liberals, but unlike Mr. Putin, they have to hold real elections. Until recently, they were helped by the fact that opposition parties splintered the vote, meaning that few of those parties had much chance of beating highly organized governing parties.
Those governing parties have also gained significant control over media in their countries. In the Czech Republic, Mr. Babis owns a media holding company with newspapers, internet portals and other news outlets. In Hungary, Mr. Orban has placed state television and much of private media under the control of loyal allies or business cronies.
Peter Kreko, the director of Political Capital, a research group in Budapest, described Hungary as “the most captured state with the most centralized media environment” in Europe. Yet he said the new mobilization by Hungary’s opposition parties could change the political dynamic there.
“They have a good message: If you fight against populists, things can be different,” Mr. Kreko said.
In the Czech elections, that was largely the theme. While Mr. Babis is seen as less extreme than Mr. Orban, he has alienated many people in the Czech Republic. They see him as a bully whose wealth and corporate ties have given him an inordinate amount of power.
Marie Jilkova, a successful anti-Babis candidate in South Moravia from one of the two coalitions of parties that came together to oppose the prime minister, said that banding together to confront Mr. Babis and his party machine “was, for us, the only way to survive — there was no alternative.”
Her own party, the Christian Democrats, differs on issues like abortion and gay marriage from the more centrist parties in her coalition, so, she said, “we agreed that we would not talk about these things during the campaign.”
Faced with a united bloc of center-right opponents, Mr. Babis and his Ano party veered to the right, railing against immigration and the European Union. He invited Mr. Orban to campaign with him.
Since he first entered politics nearly a decade ago, Mr. Babis has been inundated with questions about his financial affairs and those of his conglomerate, Agrofert. A week before the election, documents surfaced as part of the Pandora Papers project by the International Consortium of Investigative Journalists showing how he shuffled more than $20 million through offshore shell companies in 2009 to buy property in France.
Experts disagree on whether the disclosure had a significant effect on the race, but the revelations clearly rattled Mr. Babis.
“He was desperate to find issues that would scare people and convince them that only he could save them,” Ms. Jilkova said in an interview in Brno. “Fortunately, it didn’t work.”
Nationally, the opposition coalitions won 108 of 200 seats in the Parliament, a clear majority.
In Rozdrojovice, where Ms. Malenova cast her first vote since 1989, her coalition benefited from a high turnout and won 37.3 percent of the vote, a big jump on what its component parties got when they ran separately four years ago.
Petr Jerousek, who runs a wine business and owns a pub in Rozdrojovice, said his customers did not usually talk much about politics, but, faced with a choice between Mr. Babis and his foes, “they sometimes got very excited in their discussion.”
Mr. Jerousek was ecstatic about the final results late Saturday. “People finally opened their eyes,” he said. “They have had enough.”
Petr Stransky, a former police officer who now drives a municipal bus, was despondent. “I don’t like disorder and like things to be clear in society,” he said, bemoaning Mr. Babis’s defeat at the hands of what he said was unfair ganging up by opposition parties.
The mayor of the village, Daniel Strasky, said that while he wanted to see Mr. Babis go, he did not vote because he objected to an alliance between his own party, which represents mayors and other local dignitaries, and the Pirates, a rambunctious group popular with young voters.
But, he added, the loveless electoral marriage was probably worthwhile because it helped defeat Mr. Babis, whose handouts to pensioners, young rail travelers and other budget-busting measures offended the mayor’s belief in financial discipline.
Mr. Strasky was also distressed by the prime minister’s anti-immigration tirades, especially because a family from Vietnam runs the village’s only food store.
“I and everyone else in the village are so glad they are here,” the mayor said. “Nobody else would ever run that shop.”
Benjamin Novak contributed reporting from Budapest, and Petra Korlaar from Rozdrojovice.