State Senators Jim Dabakis and Stephen Urquhart were at the heart of a bill that created state-wide protection from discrimination in Utah. (Jim Urquhart/For The Washington Post)

Utah’s historic compromise aiming to balance gay and religious rights had yet to be unveiled, but on that fateful night last month, it was already unraveling.

A handful of legislators and other negotiators were seated around a squat wooden table in the blue-and-gold Senate lounge, struggling to resolve the remaining — and seemingly irreconcilable — differences between gay rights activists and the influential Mormon Church. Tempers were flaring.

“The tornado and hurricane and typhoon arrived in that room that night and the wind was blowing, and the tree of our whole effort was down at 45 degrees,” recalled Sen. Jim Dabakis (D), the state’s only openly gay legislator.

But the two sides, drawing on an unlikely trust nurtured during years of quiet rapprochement, were able that night to reach a breakthrough.

Within days, they sent a bill to the state legislature — and a message to a politically riven nation that compromise was possible, even on one of the most divisive social issues, even in one of its most conservative states.

In late 2013, a federal judge had struck down Utah’s ban on same-sex marriage, giving a lift to activists such as Dabakis who had been pushing the state to adopt legislation protecting gay men and lesbians against discrimination in such areas as housing and employment.

And as the question of same-sex marriage worked its way through the courts, ultimately winning a date before the U.S. Supreme Court this month, the Church of Jesus Christ of Latter-day Saints grew eager to reach an amicable compromise on gay and religious rights. It was determined to avoid what church officials saw as a polarized debate in several other states.

“We realized that what had happened last year — particularly in 2014, in a number of state legislatures — was that the extremes were dictating the game,” said church spokesman Michael Otterson. “We felt there was a better way.”

In the end, the negotiators in the Senate lounge had recognized that their differences were limited. The church wanted the Boy Scouts treated like religious organizations and exempted from the bill’s employment regulations. It was a compromise on which all could agree.

Eight days after the bill was introduced, it was signed into law with support from the gay rights group Equality Utah, the American Civil Liberties Union of Utah and the church, uniquely influential in a state where about 3 in 5 residents are Mormon.

At the well-attended bill signing in the state Capitol, leaders of the Mormon and gay communities embraced, a dramatic contrast to where their relationship stood a few years ago.

Push for ‘common ground’

When residents of California went to the polls in 2008 to vote on Proposition 8, a constitutional amendment defining marriage as between a man and a woman, the Mormon Church called on its congregants there to support the ballot measure.

That position troubled many in Utah’s gay community and earned the church sharp criticism elsewhere in the country. A day after the vote, the church issued a statement urging “respect and civility.” Its position on marriage was doctrinal, it said, but it did “not object” to same-sex couples getting other rights in regard to health care, housing and employment.

Equality Utah took note and launched a “common ground” push for statewide protections against discrimination.

Tensions were still high when, in the summer of 2009, a gay couple were cited for trespassing on church-owned property in downtown Salt Lake City for what the church described as “belligerent and profane behavior.” The couple said they were targeted over a kiss. Incensed, the gay community organized a “kiss-in” protest.

Soon after, the church and the LGBT community agreed to an unprecedented face-to-face meeting, arranged by a former Salt Lake City Council member.

Diane Stewart, a Mormon gay rights supporter and friend of Dabakis’s, offered her 85-year-old neoclassical home as a neutral venue.

The church officials, including lobbyist Michael Purdy, arrived first and in dark suits, Stewart recalled. The more casually dressed LGBT contingent included Dabakis and four others — a so-called Gang of Five.

What began as an introductory meeting quickly morphed into an exchange of stories of prejudice and misunderstanding.

“I don’t think anyone intended to be overtly emotional, but you know when you’re talking about your spouse or your partner or your children, it’s hard not to be,” said Brandie Balken, a former head of Equality Utah who attended the meeting.

After a few hours, and herbal tea and snacks in Stewart’s red-and-gold dining room, the session ended, but a seed was planted. The group would meet several more times at Stewart’s hillside home and elsewhere, creating enduring and emotional friendships.

The participants would in some cases invite one another into their homes, leaning on each other and helping to defuse confrontations.

Six years later, Dabakis and Purdy would again be at the table together, this time in the Senate lounge, closing the deal on the anti-discrimination bill.

A narrowing gap

The gap between the church and the LGBT community began to narrow. Later that year, the church announced support for a Salt Lake City housing and employment nondiscrimination ordinance and invited the Gang of Five and their significant others to a popular Christmas concert.

When activists from the Human Rights Campaign came to town in 2010 to deliver petitions calling on a senior church leader to apologize for what were seen as anti-gay remarks, members of the local LGBT community helped arrange an amicable presentation of the demands rather than a march on the Salt Lake Temple, Balken said.

Along the way, Balken began visiting state lawmakers in their districts, eventually making it to St. George, a city in southwestern Utah. There, she tried to make the case for nondiscrimination legislation with Steve Urquhart, a Republican state senator and a former Utah House majority whip. He said he understood but couldn’t support the bill.

Not long after, Urquhart’s eldest daughter told him that she was becoming the president of the Gay Straight Alliance at St. George’s Dixie High.

“If this is something that you’re doing just to do, how about you don’t?” Urquhart recalled telling her. It was a political headache he didn’t need in conservative St. George.

“Then I said, ‘But now, let’s talk not politician to daughter. Let’s talk father to daughter, because that’s the conversation that really matters,’ ” he continued. “ ‘If this is something that matters to you, then to hell with political concerns.’ ”

She responded that it wasn’t about her sexuality but about her gay friends. Life was extremely tough for them, and she wanted to offer her support, she told him.

“I said, ‘Great, then this is something we’re doing. I’m with you,’ ” he recounted.

Urquhart said his thinking began to shift. He stopped seeing sexual orientation as defining a person.

When Equality Utah was looking for a sponsor for its non­discrimination bill in 2013, Urquhart agreed to become its first Republican shepherd.

Roadblock to debate

That December, the federal judge ruled that the state’s ban on same-sex marriage was unconstitutional. For a time, this froze efforts to reach a deal on nondiscrimination and religious rights. Republican leaders feared that emotions were running too high for a considered debate and worried that comments made in the heat of the moment could undermine the state’s legal appeal.

Urquhart insisted that lawmakers take up his bill, taping his demand to the Senate doors. Protests mounted. But the legislation languished.

Then, in October, the U.S. Supreme Court declined to hear the case, removing the roadblock to debate.

The day after the state’s short legislative session began in January, the Mormon Church held a rare news conference in response to tense fights in states such as Arizona and Georgia over religious freedom. Four senior church leaders urged passage of religious freedom and nondiscrimination protections, giving the campaign an unexpected boost.

Stuart Adams, the state Senate majority whip, guided the effort, joining forces with Urquhart and Dabakis, and launched the late-winter negotiations involving Purdy, the church lobbyist, and Clifford Rosky, Equality Utah’s board chairman.

When the Senate bill was finally unveiled, the Human Rights Campaign called it an “extraordinary moment” for Utah. The group said the measure represented progress because it offered gay men and lesbians the same housing and employment protection as other groups — but more important, it demonstrated how religious conservatives could collaborate with advocates elsewhere.

(Adams also introduced another bill, which conservatives said was needed to address their concerns about marriage. It would pass, but only after Adams worked to address the concerns of the LGBT community, some of whom described the measure as unnecessary.)

Gov. Gary R. Herbert (R) made clear that he would sign the bill if the legislature got it to his desk. Both houses of the Republican-dominated legislature passed the bill by overwhelming margins.

State Rep. Brad Dee (R), a former majority leader who was the bill’s House floor sponsor, had the final word during the legislative debate.

“Please understand, I did not ask for this — to be this sponsor,” he said, his voice shaking. “But I believe tonight there is a reason I was. Vote your conscience. Let’s send a message today from this Hill.”

Correction: An earlier version of this story misstated the location of the city of St. George. It is in southwestern, not southeastern, Utah. This version has been corrected.