The Rev. Bud Heckman, who was facing a church trial that would have been the first prominent #MeToo case in the United Methodist Church, admitted guilt and agreed to retire, the church said Thursday.

Heckman was accused of harassment by four women, including his ex-wife, an ex-girlfriend and two young women who said he harassed them at an interfaith conference. On Thursday, the church’s West Ohio conference said in a statement that Heckman had admitted to harassment as well as failure to be celibate while single and faithful while married.

“I deeply regret the harm that has been caused to any person due to an act of sexual misconduct by a pastor. There is no excuse,” Bishop Gregory V. Palmer, who leads the West Ohio conference, said in a statement.

Heckman admitted guilt on certain church charges, according to the church. But in statements to The Washington Post after the resolution was reached, he vehemently denied many of the specific allegations made by the women and investigated by a church committee.

The case involving Heckman, who began his career in an Ohio pulpit and has since been a leader in multiple interfaith-relations organizations, has been closely watched by advocates for women within the nation’s third-largest religious denomination. Methodists tend to conduct church trials behind closed doors, and advocates had wondered how the denomination would handle a sexual harassment case that had gained public attention.

The 12 million-member mainline Protestant denomination operates a sophisticated internal judicial system, complete with prosecutors and defense attorneys (all of whom are clergy), judges, juries and trials.

In recent years, Methodist church trials have made the news when pastors have been put on trial for officiating same-sex marriages. This year, the church voted to adopt a highly controversial set of rules that could soon drastically increase the frequency of such trials: Starting Jan. 1, the church’s mandatory penalty for officiating a same-sex marriage is a year’s suspension without pay, and a second conviction means a pastor will be defrocked.

But the United Methodist Book of Discipline deals with all sorts of church crimes, not just officiating at same-sex marriages and being involved in gay relationships.

An ex-girlfriend of Heckman’s, who spoke to The Post on the condition that she be identified by the initials K.R. because she said she remains afraid of him, said that he stalked her when she tried to break off their relationship. He sent her messages, waited outside her apartment and scrawled chalk messages in front of her building.

Many details of K.R.’s account are reflected in the church’s 12-count charging document in Heckman’s case, which a church committee compiled on the basis of affidavits from the four accusers and interviews with Heckman and several witnesses.

The charging document says that it should “not be shared with any unauthorized individuals,” and clergy-lawyers for both Heckman and the church refused to provide it to The Post. The Post obtained a copy from another person on the condition that the newspaper not publish any direct quotes from the charges.

After K.R. went to the police, Heckman was charged with stalking and harassment. He eventually pleaded guilty in a New York court in 2012 to a lesser charge. Heckman noted that he obtained an order of protection himself against K.R.

Laura Heckman, who was divorcing Bud Heckman around the time of his guilty plea, said she grew frightened of her husband, as well. He insisted with alarming vehemence that he wouldn’t pay child support for their two children, she said. Once, she said, he implied that he would kill the children rather than pay for their care.

She called the church. “I said, ‘Please, please help me. One of your ministers is threatening to kill my children,’” Laura Heckman recalled.

After reaching a settlement, Bud Heckman disputed this allegation Thursday in a conversation with a Post reporter. “I have always paid child support on time, in full, and without complaint,” he wrote in a text message, “and have never challenge[d] the well being of my spouse or children. Her claim is ridiculous and insulting.”

Laura Heckman said she sent Palmer documentation at the time of her husband’s recent guilty plea.

Palmer did not respond to inquiries from The Post. But Laura Heckman said the bishop never took her calls. “It was devastating. Bud’s betrayal, in some ways, was a little bit easier to accept … But the bishop and the church’s betrayal is excruciating,” she said.

That meant her ex-husband was still a pastor. And in time, he would harm women again, according to some of the accusers.

Megan Anderson met Bud Heckman in 2015. She was a junior in college and working in her first job, an entry-level role at the Interfaith Observer, a small religious newspaper. The job sent her to Salt Lake City to an event called the Parliament of the World’s Religions. When she got there, her boss pointed out Heckman: If Anderson, a joint major in math and religion, was interested in a career in interfaith work, Heckman was the person to know, her boss said.

Heckman seemed interested in getting to know Anderson, taking her on a tourist outing where she said that he touched her several times in a way that made her uncomfortable. He asked her to come to his hotel room afterward and tried to put his hand in her pants, according to her account and the church’s charging document.

She fled the hotel room, but the harassment did not end, she said. For months, she said, Heckman texted her about his sexual thoughts about her.

Heckman disagreed with Anderson’s assertions in an email to The Post, in which he wrote: “Rev. Heckman never touched Megan, nor shared sexual thoughts with her, and she did not flee his hotel room.”

At the same 2015 conference, Heckman entered the hotel room of another young woman whom he had met at an interfaith event the year before, according to that woman’s eventual allegations against him. She said he was wearing his boxer underwear; Heckman claimed after the settlement that he was wearing running shorts and that the woman had invited him to her room to show him a video. Over a period of years, he sent her sexually explicit text messages and once talked in a work-related phone call about his desire for intimate contact with her, according to the church charges. Heckman denied those charges after the settlement.

K. R. and Anderson did not immediately respond Thursday night to inquiries about the settlement.

The advocates who helped the four women bring their case had said earlier that they hoped Heckman’s case, the first Methodist #MeToo case to go public despite the church’s secrecy on judicial matters, will help the church improve its process for handling harassment allegations. Already, said law student and Methodist trial advocate Kevin Nelson, women who say that they have been harassed by other Methodist ministers are asking whether they, too, should bring cases to their bishop: “Some people are beginning to see that it’s not a fact that if you tell your story, no one is going to care.”

This story has been updated to include additional responses from Heckman.