Kody Partridge, left, and her wife, Laurie Wood, celebrate after the GOP-controlled Utah Legislature passes an anti-discrimination bill on March 11 in Salt Lake City. A Mormon Church-backed anti-discrimination bill that protects LGBT Utah residents and religious rights passed the House of Representatives 65 to 10. (Rick Bowmer/AP)

Utah lawmakers and Mormon Church leaders celebrated a landmark moment Wednesday night, when a bill banning discrimination against lesbian, gay, bisexual and transgender people passed the state’s Republican-controlled legislature.

The legislation passed Utah’s Senate last week, 23 to 5, and the House on Wednesday night, 65 to 10.

The bill, which has been called the “Utah compromise,” aims to protect people in the LGBT community from employment and housing decisions based on their gender identity or sexual orientation, while still shielding religious institutions that stand against homosexuality. It does not deal with the more controversial question, however, about whether a business can deny services because of religious convictions, such as a wedding photographer who objects to shooting a same-sex wedding.

Still, the move has been seen by some as a model in compromise as the Church of Jesus Christ of Latter-day Saints endorsed the legislation last week. The partnership helped accelerate the bill’s passage through Utah’s legislature. It was proposed only last week.

The church, while standing by its views, has been a voice of tolerance on issues of gender equality in a manner that has surprised some of its traditional critics. For example, when the federal courts ruled same-sex marriage was legal in Utah, Dallin H. Oaks, a member of the Mormon Church Quorum of the Twelve Apostles, its second-highest governing body, urged Mormons to respond with “civility” when their views are not upheld on issues such as marriage, pornography and drugs.

“When our positions do not prevail, we should accept unfavorable results graciously, and practice civility with our adversaries,” he said.

While not wholly satisfactory to LGBT advocacy groups, most figured the legislation went about as far as a conservative state like Utah could go.

“It contains a lot of provisions that are unique to the legal climate of Utah that would not translate elsewhere,” the progressive lobby ThinkProgress reported. “Given the ubiquitous presence of the Church of Latter-Day Saints (LDS) in Utah, it may be the best bill that could pass there — and is thus better than no protections.”

The church, when it endorsed the measure, said in a statement that it thought the bill provided a level of “fairness for everyone.”

“In a society which has starkly diverse views on what rights should be protected, the most sensible way to move forward is for all parties to recognize the legitimate concerns of others,” it said. “After a considerable amount of hard work, we believe that the Utah legislature has wisely struck that balance. LGBT people cannot be fired or denied housing just for being gay. At the same time, religious conscience and the right to protect deeply held religious beliefs is protected by robust legislation. While none of the parties achieved all they wanted, we do at least now have an opportunity to lessen the divisiveness in our communities without compromising on key principles.”

Before Wednesday’s vote, Rep. Brad Dee, a Republican from Ogden who is one of the bill’s sponsors, said he wasn’t asking anyone to “condone the lifestyle.”

“I’m not asking you to give rights to them to preserve their lifestyle,” he said, according to the Associated Press. “In the narrowest form, I’m asking you to guarantee their rights, the same rights you and I have today.”

Utah Gov. Gary Herbert (R) is expected to sign the bill on Thursday evening.

The bill would amend Utah’s anti-discrimination and fair housing acts to include sexual orientation and gender identity as well as to define exemptions for religious organizations and provide protections for religious freedoms.

[LGBT, Mormon groups in Utah to announce compromise anti-discrimination measure]

Twenty-one states and the District have passed similar anti-discrimination legislation to protect gay and lesbian people when it comes to housing and employment. Eighteen states and the District have protections for gender identity. But Utah’s proposed legislation gained national attention last week when the Church of Jesus Christ of Latter-day Saints, which has been preaching acceptance over the years on same-sex attraction, sent two apostles, the church’s top spiritual leaders, to a news conference to publicly endorse the bill.

“The Church of Jesus Christ of Latter-day Saints is very pleased to support” the bill, Elder D. Todd Christofferson of the Quorum of the Twelve Apostles said, according to the Deseret News.

He said that although he expected the bill to come under criticism, it offered a “fair” anti-discrimination approach.

“It is better that both sides get most of what is desired than to have a winner-take-all where one side loses,” he said.

If the bill is signed on Thursday, it will make it illegal for employers to base hiring and firing decisions, for example, on someone’s gender identity or sexual orientation. Likewise, it would keep landlords from refusing to sell or rent to someone in the LGBT community. The bill exempts religious institutions and affiliates such as charities, schools, hospitals and family-owned businesses. Specifically, the exemption includes the Boy Scouts of America, which has banned gay scout leaders.

It will also protect employees who want to express their religious or moral beliefs in the workplace “in a reasonable, non-disruptive, and non-harassing way,” according to the legislation.

The bill does not prohibit employers from setting “reasonable dress and grooming standards” or “reasonable rules and policies” regarding sex-specific facilities, such as restrooms and showers.

Rep. Sandra Hollins, a Democrat from Salt Lake City and the House’s only African American member, showed frustration that there was even a need for such a bill, the Salt Lake Tribune reported.

“I stand before you today disturbed that in 2015, we have individuals in our community who are standing before us asking to be treated equally,” she said. “This is embarrassing.”

Some who oppose it claim the bill does not adequately protect people’s religious freedoms. Others argue it’s too short-sighted, applying only to state anti-discrimination laws.

“This is a deep constitutional dive in a very shallow pool of time and process,” Republican Rep. Ken Ivory said, according to Salt Lake Tribune.

About 20 cities and counties in Utah have nondiscrimination laws, but the state legislation would take precedence.

Equality Utah Executive Director Troy Williams called the action a “monumental day for Utah.”

“This vote proves that protections for gay and transgender people in housing and the workplace can gracefully coexist with the rights of people of faith,” he said, according to the Salt Lake Tribune. “One does not exist at the expense of the other.”

Utah’s House passed a second bill on Wednesday that would give county clerks the freedom to refuse to marry same-sex couples as long as the clerk’s office appoints someone else to officiate, according to the AP.

Sen. Jim Dabakis, a Democrat from Salt Lake City and the state’s only openly gay legislator, said Utah has taken a step toward change.

“Oh, if the country could be like this,” he said, according to the Deseret News. “This bill is a model — not just of legislation, but more importantly of how to bridge the cultural rift tearing America apart.”