A Methodist pastor defrocked for officiating his gay son’s wedding urged District churchgoers on Sunday not to abandon the denomination, even as the same-sex marriage debate threatens to further divide it.

Wearing a dark suit and a gay-symbolic rainbow stole around his shoulders, Frank Schaefer, 52, told the audience at Foundry United Methodist Church that it was “important to stay together.”

Mr. Schaefer spoke to a standing-room-only crowd at the Dupont Circle-based church. Many of the people present wore rainbow ribbons pinned to their chests, and gave Mr. Schaefer — who was joined by his wife and two of his four children — several standing ovations during his sermon on all-inclusive love.

“The fourth Sunday of advent is dedicated to love,” Mr. Schaefer said, “and showing it not just when things are hunky-dory but when we find ourselves between life and faith. That’s what God wants us to do: Act in love even when the tension mounts.”

Mr. Schaefer is at the center of an intrafaith debate over gay marriage and the United Methodist Church. Last week, Mr. Schaefer was defrocked by the church for officiating his son’s gay wedding in 2007. The church initially suspended him for 30 days last month, giving him time to decide whether he would pledge to uphold the church’s teachings on homosexuality, which he did not.

Mr. Schaefer said Sunday that he had filed an appeal of the church’s decision, but he did not expect a result until at least the middle of 2015. In the meantime, he said, he would be an outspoken advocate for the gay community, and was strongly considering a job offer out west.

Bishop Minerva G. Carcano of Los Angeles called Mr. Schaefer and offered him a job with the church’s California-Pacific Conference.

“When Bishop Carcano called I felt my heart strangely warmed,” Mr. Schaefer said. “I don’t know what that means at this point. But I am seriously considering following that calling. She’s really going against the grain here. What she’s doing is incredible.”

Mr. Schaefer said he would not be ordained, which would violate church law, but would include a license to minister.

Like various denominations before it, the United Methodist Church is being faced with the question of whether to change church doctrine to fit the changing culture and opinions of its members.

Last year during the church’s general conference, which is held once every four years, delegates voted to uphold the church’s Book of Doctrine and Rules teaching that homosexual acts are “incompatible with Christian teaching.”

In May of this year, the church charged the Rev. Thomas Ogletree, a professor emeritus of Theological and Social Ethics at Yale University Divinity School, for officiating his son’s gay wedding in October 2012. The United Methodist Church defrocked a female pastor from Pennsylvania in 2005 after she admitted living in an open lesbian relationship.

During his sermon, Mr. Schaefer said he was disappointed in his church trial, and explained the difficulty in the decision he had to make between the rules of the church and “loving and affirming my son.”

“When that moment came I was sick to my stomach,” Mr. Schaefer said. “I knew I had to confess I believe this rule is discriminatory and wrong.”

Foundry’s Senior Pastor Dean Snyder and Associate Pastor Dawn Hand led church leaders and advocates in welcoming Mr. Schaefer and his family to the church as members. Mr. Schaefer is scheduled to speak at the church in late January.

After the service, Mr. Schaefer answered questions and accepted well wishes, while others asked for advice on how to keep the faith while struggling with church teaching.

Will McLeod, who just moved to the District with his wife, said his family had been a part of the United Methodist Church for a century, but recently he had begun considering a move to the Episcopal Church.

Mr. Schaefer “convinced me to stay,” the 29-year-old said. “He showed we should not leave the church behind to be taken over by people who don’t want to preach love. I feel like what we are called to do is stay in the church, put our feet on the Rock, and say we will not be moved.”