Javier Milei, a far-right libertarian leading the polls in Argentina’s presidential election this month, has made a lot of contentious statements in recent years: Humans did not cause climate change; people should be able to sell their organs; his nation’s currency “is not even good as manure.”

But, to many Argentines, he has done something far worse: attacked the pope.

In 2020, Mr. Milei, a self-identifying Catholic, called Pope Francis an “imbecile” and “the representative of the Evil One on earth” because he defends “social justice.” Last year, Mr. Milei said the pope “always stands on the side of evil” because he supports taxes.

And last month, in an interview with the former Fox News host Tucker Carlson, Mr. Milei said the pope “has an affinity for murderous communists” and is violating the Ten Commandments.

Those are bold words for a man trying to become president in Argentina, where nearly two out of three people identify as Catholic, where the state is officially Catholic and where the Argentine pope is, to many, a national hero.

But Mr. Milei — a Rolling Stones cover band singer turned libertarian economist turned television pundit turned politician — is not your average presidential candidate.

He has run with little party structure around him. He has vowed to decimate the government he is vying to lead. He promises deep cuts to social services. He wants to discard his nation’s currency.

And instead of campaigning with a spouse and children, Mr. Milei has an immediate family that consists of his sister (who runs his campaign), his girlfriend (who gets paid to impersonate a political archrival) and his five Mastiff dogs (which are clones of his previous dog).

The approach may be unorthodox, but it is working.

In August, Mr. Milei won open primaries with 30 percent of the vote, ahead of candidates from the center-left party running the country and the establishment conservative party.

Since then, he has continued to lead polls and analysts say he is likely to attract enough votes in the election on Sunday to either head to a runoff or win the presidency outright.

But his past comments are still shadowing him.

“He talked trash about the pope,” said Maria Vera, 47, an empanada seller in a large slum called Villa 21-24 in southern Buenos Aires. “If Milei doesn’t have respect for our holiest priest, I don’t know whom he’s going to have respect for.” She is not voting for him, she said.

On a road leading to the slum, walls were covered with posters of the pope’s face and a clear message: “Milei hates him. The people love him. Which side are you on?”

The Vatican has stayed quiet on the issue and did not respond to a request for comment. But in Argentina, church leaders are pushing back.

Last month, some of Argentina’s top Catholic priests organized a mass in Villa 21-24 to atone for Mr. Milei’s “shameful insults” toward the pope. They erected an altar outside the church, and 30 priests stood and read a statement supporting Pope Francis, as parishioners filled the road.

The leader of the church, the Rev. Lorenzo de Vedia, known widely as Padre Toto, said much of his flock continued to bring up Mr. Milei’s comments. “Even people who are not so involved in the daily life of the church are really offended,” all the more so, he said, now that Mr. Milei “has a chance to be president.”

Mr. Milei’s campaign declined to make him available for an interview.

His opponents have tried to seize on the controversy.

Sergio Massa, Argentina’s finance minister, who is polling just behind Mr. Milei, used his one chance to question Mr. Milei during a debate this month to needle him about the pope. “You insulted the head of the church,” he said. “Please use these 45 seconds to ask for forgiveness to the most important Argentine in history.”

Mr. Milei sought to dismiss his past comments, saying he made them before he entered politics, though several have come since he was elected to Congress in 2021. He also said he had apologized to the pope, though The Times could not find a record of that and his campaign could not provide specifics.

“I have no problem apologizing if I am wrong,” Mr. Milei said to his opponent at the debate. “Stop taunting me and focus on lowering inflation.”

Some people who were once close to Mr. Milei have criticized his comments about the pope.

Eduardo Eurnekian, one of Argentina’s most prominent businessmen and Mr. Milei’s former boss when he was an economist, said in a radio interview that Mr. Milei’s comments were “totally out of line,” adding that “the pope is the pope, he has a huge responsibility, and we’ve been respecting his figure for over 2,000 years.”

But plenty of other allies — and voters — are less troubled by his comments.

In the tiny town of Chicoana in northern Argentina, Daniel Mamani, 64, has played the role of Jesus Christ in the town’s Easter celebration for more than a decade.

While Mr. Milei’s comments about the pope made him uncomfortable, he said, he plans to vote for him because the country needs change. “He will have to pay for his debts, won’t he? That is, with the Lord above,” Mr. Mamani, an auto mechanic, said. “I’m interested in the part that is going to help Argentina’s well-being.”

Lilia Lemoine, Mr. Milei’s friend and hair stylist running for Congress on his ticket, said that she and Mr. Milei had long spoken about what she described as the pope’s leftist positions.

“I think exactly the same as he does,” she said of Mr. Milei. The pope “supports communism and gender ideology, and I don’t think that’s what Catholicism is.” She added, “Javier apologized for what he said, but I wouldn’t.”

Ms. Lemoine said that Mr. Milei had also been moving away from the Catholic church in other ways. “Now he is studying kabbalah,” a form of Jewish mysticism, she said. “He became really close friends with a couple of rabbis.”

In fact, after Mr. Milei won a seat in Argentina’s Congress in 2021, several Argentine news outlets quoted him as saying that he was considering converting to Judaism and aspired “to become the first Jewish president in the history of Argentina.” Mr. Milei’s campaign denied that he had ever said that.

In August, in an interview with the Argentine newspaper La Nación, Mr. Milei said that, in many ways, he felt Jewish. “I don’t go to church, I go to temple,” he said. “I don’t talk to priests, I have a head rabbi and I study Torah. I am internationally recognized as a friend of Israel and a Torah scholar.”

Last month, Mr. Milei said he went to Miami to spend Shabbat with friends and then flew to New York to meet with a rabbi.

Still, Mr. Milei has continued to describe himself as a Catholic and has staked out positions more in line with Vatican policy than his opponents, including aiming to ban abortion, which was legalized in Argentina in 2020.

Pope Francis was born as Jorge Mario Bergoglio in Buenos Aires in 1936. From 1998 to his election as pope in 2013, he was Argentina’s highest Catholic official, known for his work with the poor.

The pope has clashed with politicians before. His staunch support for the Vatican’s positions on social issues, including abortion, same-sex marriage and adoptions by gay couples, also made him a sort of political rival to the former left-wing presidents of Argentina, Néstor Kirchner and Cristina Fernández de Kirchner.

In 2010, when Mrs. Kirchner’s government supported legalizing same-sex marriage, Francis, who was not yet pope, described the law as “a maneuver by the devil.” Mrs. Kirchner fired back that the church’s stance was “medieval.”

Mr. Milei’s criticism has been much harsher. He has called Pope Francis a “filthy leftist,” an “embarrassing communist,” a “piece of shit” and a “potato.” (The Spanish word for “pope” also means “potato.”)

During his 10 years as the first pope from the Americas, Pope Francis has visited all of Argentina’s neighbors — but not Argentina. It has been widely speculated that he has avoided his home country to keep out of its polarizing politics.

But Francis has said he plans to return home next year.

Who might be welcoming him? President Milei.

Natalie Alcoba contributed reporting from Buenos Aires.