Pete Buttigieg made history as the first openly gay presidential candidate to win primary delegates before ending his campaign on Sunday. But LGBT advocates working for more inclusion in churches say the former mayor of South Bend, Ind., broke another, equally important barrier: He spoke openly of his Christian faith in a country where religion and gay rights are often seen at odds with each other.

On the campaign trail, Buttigieg talked about how his faith, and his reading of the Bible, influenced his liberal policy positions. He easily quoted scripture, was the first 2020 candidate to hire a faith outreach director and regularly met with religious leaders.

Notably, the Democrat tied his faith to his sexuality within the first months of his campaign. Taking a jab at his fellow Hoosier, Vice President Pence, who has a long history of opposing same-sex marriage, Buttigieg said his marriage to Chasten Buttigieg has brought him closer to God and made him “more compassionate, more understanding, more self-aware and more decent.”

“The church has been the source of our greatest pain for so many people,” said Gene Robinson, the first openly gay bishop of the Episcopal Church. “To have someone who has put these two things together in such a positive, life-affirming way, is a game changer.”

Nearly two decades ago, Robinson, then-bishop of New Hampshire, was at the center of a debate over sexuality and scripture in the Episcopal Church, which now performs same-sex marriages nationwide. Robinson said he served in a pastoral role for Buttigieg in recent months but didn’t join him on the campaign officially.

“I said to him: ‘Thanks to your candidacy, there’s some little kid in Idaho or Alabama that thinks he or she can be president,’ ” Robinson said. “It would be hard to underestimate what this does to religion. I have never, in my lifetime, seen anyone so good at articulating and living out the rightful role of religion in the public square.”

Robinson said Buttigieg, who joined the Episcopal Church after he spent time studying in England and in Anglican churches, also showed how someone can find churches that are open and affirming.

“There are plenty of churches that haven’t evolved, but many have taken a new look around LGBTQ issues,” he said. “Someone who has left their religious tradition might be surprised where their church or synagogue or mosque is now.”

Buttigieg often urged people to “stop seeing religion used as a kind of cudgel, as if God belonged to a political party,” as he told NBC in May. He framed policies in moral terms, calling contributing to climate change “a kind of sin.” And he called out what he saw as religious hypocrisy.

As someone who was married in an Episcopal Church, he lived out the idea of church inclusivity on the national stage. His presence forced conservative Christian pastors to combat arguments for LGBT inclusion, said Jonathan Merritt, a liberal Christian writer who grew up in a Southern Baptist church and often writes on LGBT issues and faith.

The Fix’s Eugene Scott breaks down former South Bend, Ind., mayor Pete Buttigieg’s presidential bid and what it could mean for gay rights. (The Washington Post)

For the past several years, debates over LGBT inclusion have unfolded among activists, theologians and pastors and have caused divisions in several denominations, including the Episcopal Church, the United Methodist Church and many evangelical megachurches.

“Mayor Pete took the arguments that have been disseminated in YouTube videos and books, and he held a megaphone to them,” Merritt said. “He wasn’t saying something that was new and dangerous. He was amplifying something dangerous that is already circulating.”

Other Democratic candidates also talk about their faith: Sen. Elizabeth Warren (Mass.) recalls teaching in Sunday school; Sen. Bernie Sanders (I-Vt.) and former New York mayor Mike Bloomberg — who left the race Wednesday — have discussed their Jewish identities and upbringings; and former vice president Joe Biden describes his Catholic faith in very personal terms.

But no one talked about religion as openly or directly as Buttigieg, observers said.

“What Pete did is show someone who is confidently secure in his marriage, active in his Episcopalian church and speaks eloquently about being a person of faith,” said Guthrie Graves-Fitzsimmons, a fellow at the Center for American Progress. “People know about LGBT rights, but there’s not as much representation that LGBT are people of faith; those ideas are seen in conflict.”

Liberal candidates are often afraid of appearing too religious because it could be off-putting to voters who favor gay rights, said Matthew Vines, an activist who runs the Reformation Project, a group that works to promote the inclusion of LGBTQ people in churches. But because Buttigieg is gay, Vines said, he could talk about religion in a way that wasn’t assumed to be coming from a conservative position.

“In some ways, he could talk more about his faith among the Democrats because, just by him being gay, that already helps to address one of the big points of anxiety for a lot of more left-leaning voters,” Vines said. “Faith is often wielded to harm LGBT people.”

Buttigieg’s sexuality drew some negative attention from conservatives during the campaign, including a call to repentance from evangelist Rev. Franklin Graham. Buttigieg’s brother-in-law Rhyan Glezman, who is an evangelical pastor in Michigan, spoke publicly about opposing the marriage and described his political campaign as “unbiblical.”

Robert George, who teaches philosophy and law at Princeton University, said that Pete Buttigieg identifying as gay was less troubling to social conservatives than his policy proposals. For instance, George said, conservatives were especially troubled by a January interview with Washington Post columnist Mike Gerson where Buttigieg suggested religious institutions such as colleges should not be able to admit or hire according to their traditional religious standards.

“He was a threat because he gave the appearance of being a moderate,” George said, also pointing to how Buttigieg did not support restrictions on abortion rights. “That was a bigger threat than where he was on sexual identification.”

Brandan Robertson, pastor of a liberal church called Missiongathering in San Diego, said some conservatives were less inclined to be critical, in part because they knew that criticisms could backfire and become directed toward the personal life of President Trump.

“The reaction of moderate conservatives has been that the religious right has lost its moral authority, so who are they to critique a gay man and his husband when we have a president allegedly paying off porn stars?” Robertson said. “I think if he would’ve gotten further, it would’ve been more of a conversation.”

The Rev. C.B. “Cricket” Park, the rector of the Episcopal Church of the Redeemer of Bethesda, Md., said she has been a gay rights activist with the Episcopal Church for nearly three decades and never thought she would see a gay presidential candidate in her lifetime.

“Some of us church geeks are excited about the fact that he’s an Episcopalian and made it known,” said Park, who is from South Bend, Ind., where Buttigieg was mayor. Now, she isn’t sure which Democratic candidate she likes best, because none of them compare to Buttigieg for her.

Buttigieg was able to appeal to voters in ways similar to former president Barack Obama’s, said Andrew Walker, a professor of Christian ethics and apologetics at Southern Baptist Theological Seminary in Louisville.

“He could appeal to a very progressive secular base, on the grounds that he’s a man in a same-sex marriage and he climbed the ladder through elite institutions,” Walker said. “Mainline Protestants do not typically wear their faith on their sleeves. Pete Buttigieg did. It was a peculiar moment in religion and politics.”