BRATISLAVA, Slovakia — During the final debate before Saturday’s presidential election in Slovakia, the men were arguing, but the only woman onstage, Zuzana Caputova, looked on calmly.
Stefan Harabin, the former justice minister and a champion of ethnic nationalism, accused Muslim migrants of “killing and raping European women in Germany and France” and claimed his opponents wanted to destroy Slovak culture.
But Ms. Caputova did not respond to the outrage. In a political climate where stridency is often rewarded and crudeness frequently seen as a marker of authenticity, she has clung to the belief that decency is what voters want most. And it seems to be working.
In an interview the morning after the debate, she said: “Even though people might not agree with all my opinions, they can build a bridge of trust to me because I act with civility. Even if I fight, I don’t fight the person, but only the actions of the person.”
The latest polls show Ms. Caputova with a commanding lead over all her rivals: The field has been winnowed from about a dozen candidates to five, including an avowed neo-Nazi, Marian Kotleba. If Ms. Caputova becomes the first woman to lead this nation of 5.4 million people, she will have done so against all odds and conventional political wisdom.
“For Slovakia, this election will determine whether we follow the path toward some form of illiberal democracy,” said Aneta Vilagi, a political scientist at Comenius University in Bratislava. “Or it could be an exceptional moment both for this country and in the region, the first big victory for a candidate promoting liberal democracy in the last four years.”
Ms. Caputova, 45, a campaigning lawyer who had never run for office and was barely registering among voters before the first debates six weeks ago, has emerged from virtual obscurity to become the front-runner as the deputy of a new party, Progressive Slovakia.
Beyond Slovakia, Ms. Caputova’s unlikely rise and broad support in this deeply conservative country has given hope to opposition leaders in other countries, who sense that a backlash against populists may be brewing.
From Bucharest, the Romanian capital, to Bratislava, the Slovak capital, hundreds of thousands of people have taken to the streets in the past year to voice frustration with governments led by self-styled populists and ethnic nationalists. But channeling that energy into the voting booth has proved more challenging.
That may soon be tested in a number of countries. In Poland, where a fierce battle is raging over the country’s future with national elections scheduled in October, support in major cities for the governing Law and Justice party has plummeted, with voters choosing opposition politicians in most local elections last year.
That opposition has deepened since the mayor of Gdansk, Pawel Adamowicz, was fatally stabbed onstage during a charity event. He was widely viewed as a champion of a pluralistic Poland, and many saw the attack as evidence of the toxic political climate in the country.
In Slovakia, it was the murders of a young investigative reporter, Jan Kuciak, and his fiancée that galvanized the public. Mr. Kuciak was killed, the authorities said, because of his work investigating corruption that linked organized crime with political leaders and an effort to steal funds provided to the nation by the European Union.
On Thursday, the police charged a prominent businessman, Marian Kocner, with having ordered the killing.
The murders, and the government’s response, led to the largest protests in the country since the Velvet Revolution in 1989 in what was then Czechoslovakia. Juraj Seliga, 28, one of the organizers of the demonstrations, said it was a defining moment for the country.
“People realized they have the power; they can hold people accountable,” he said. “But they have to show up.”
Ms. Caputova said the events in Slovakia had inspired her to enter the race. “People are feeling frustrated and disappointed and are yearning for change. Some candidates have chosen to exploit this fear. But for me, using the emotions of hatred and fear is destructive.”
Ms. Vilagi said that even before the murders, many Slovaks had been nervous about the country’s direction. “People were asking, What is going on in Hungary? What is going on in Poland?” she said. “And it started to become more and more clear that the same thing could happen here. There was a real growing fear that our democracy could be at risk.”
Ms. Vilagi said that Robert Fico, the prime minister at the time and now the leader of the governing party, Direction — Social Democracy, or SMER, which has dominated politics for the past a decade, was not a populist in an ideological sense. “But he used the tools of the populists,” she said.
Martin Slosiarik, one of Slovakia’s leading pollsters, said the message that Mr. Fico had spent years championing — condemning migrants and bureaucrats in Brussels while promoting a range of conspiracy theories — has had an effect.
“We see more and more people, frustrated by the system, turning to radical ideas,” Mr. Slosiarik said.
Mr. Harabin, the former justice minister, for instance, has condemned NATO, relishes bashing Brussels and has made gay men and lesbians frequent targets of scorn.
In Slovakia, as more evidence surfaced that populist rhetoric may have been a cover for corruption, public anger swelled. After Mr. Kuciak was killed and anger exploded into the streets, Mr. Fico was forced to step down as prime minister, and support for SMER collapsed.
Mr. Slosiarik said that he had never witnessed such a drastic drop in such a short time.
In the last poll before Election Day — taken on March 1 — the governing party’s candidate, Maros Sefcovic, finished second but trailed Ms. Caputova by more than 30 points: 16.7 percent to 52.9 percent. Mr. Harabin polled in third place, with just over 11 percent.
Under the Slovak system, outright victory is difficult in the first round of voting, and Ms. Caputova is expected to face either Mr. Sefcovic or Mr. Harabin in a runoff in two weeks. If it is Mr. Harabin, observers expect a brutal battle.
In an earlier debate, Mr. Harabin condemned Ms. Caputova as a representative of “ultraliberalism, L.G.B.T., gender ideology” who would “destroy families” and is a “lover of migration” who “would accept foreign armies in Slovakia.”
“I will never allow that as president,” he thundered.
Ms. Caputova responded with restraint, refusing to attack him personally. “We are facing a crisis in trust,” she said. As faith in politicians and the institutions of the state continues to be eroded, she said, “populists and extremists are gaining ground.”
The best tool to restore trust, Ms. Caputova said, was authenticity — even if it meant risking votes.
She leads in the polls despite not shying away from positions long considered poisonous, including support for gay rights. For 14 years, she had waged an often-lonely battle against the expansion of a toxic landfill in Pezinok, a small town outside Bratislava. Eventually, she prevailed and is now sometimes referred to as the Erin Brockovich of Slovakia.
But she has also been the subject of strong-arm tactics and often-vile abuse, with threats so serious that she has had to hire security.
Ms. Caputova recalled having coffee with Mr. Kocner, the businessman charged with ordering the murder of the Slovak journalist and whose interests was tied up in one of her environmental cases a few years ago.
“He asked me if I was afraid of him,” she recalled. “I was in fighting mode then. So I said no. But it was one of the quickest cups of coffee I have ever had,” she said, laughing.
“He then asked me under what conditions I would stop,” she added. “I said there was no way I would stop. It was just too important.”