Soon, members of the clergy found themselves performing more burial rites for drug suspects and comforting more of the spouses and children left behind. More shabu addicts and drug peddlers sought their protection. All this opened the eyes of priests and nuns to a criminal underworld many of them had not encountered before and to the misery that drives the poor to the drug trade.

“I didn’t feel myself worthy to be a priest,” Father Villanueva said, explaining his change of heart. “Before, my battle cry was atonement. Now, it’s grace and hope.”

There is little other resistance to the Duterte administration. The president ended his first year in office in June with a popularity rating of more than 80 percent, despite both the death toll of his antidrug campaign and his decision in late May to declare martial law in the southern Philippines, after Islamic State supporters seized parts of a city there. The political opposition is effete, apparently incapable of articulating an alternative to his populism. Human rights advocates have been unable to marshal public outrage even after the president threatened to behead them.

The church, however, is galvanizing opposition among the faithful. As early as July 2016, Broderick Pabillo, the auxiliary archbishop of Manila, held mass for victims of the government’s antidrug measures and initiated a “Thou Shall Not Kill” campaign. Banners stating the commandment were displayed in churches all around the capital — where nightly, it seemed, corpses of drug suspects were being found in the streets, hands bound or heads wrapped in packing tape.

The next month, Socrates Villegas, the president of the Catholic Bishops’ Conference of the Philippines, instructed the priests in his diocese to read a statement that said, “Both the guilty and the innocent are humans.” The Association of Major Religious Superiors in the Philippines, which represents the country’s most influential Catholic congregations, followed suit. “We are alarmed at the silence of the government, groups and majority of the people in the face of these killings,” it said in another statement. “Evil prospers where good men are silent.”

The president has struck back, trying to undermine the church’s claims to moral virtue. “I challenge the Catholic Church,” he said in a speech in January. “You are full of shit. You all smell bad, corruption and all.”

Mr. Duterte has insulted the pope. He has accused a Catholic bishop of having two wives. He has revived old allegations that half a dozen bishops received luxury vehicles from a government charity in 2009 in exchange for supporting Gloria Macapagal-Arroyo, the president at the time. He has castigated the whole of the Philippine clergy for living opulently amid poverty, sexually abusing children and opposing a popular law requiring state clinics to provide free birth control.