Utah lawmakers of both parties, Mormon Church leaders and gay equality advocates Wednesday praised a new bill meant to protect from discrimination lesbian, gay, bisexual and transgender people, as well as opponents of gay equality who cite religion as a basis for their beliefs.

The collaboration of a traditional faith group and gay rights groups on the divisive culture war issue was historic, said leaders from various groups at a midday news conference in Salt Lake City announcing the measure, which will be introduced in both chambers and is expected to be voted upon before the state session ends next week.

“It’s monumental in the significantly LDS population of Utah that we could move this forward, and if we can do it in a very, very red state like Utah.. find a way to exist together and try to find a way to respect one another’s rights – it can be done anywhere in the United States,” said Senate Majority Whip Stuart Adams (R), a co-sponsor and church member who was charged with crafting the religious freedom protections. “It’s not perfect but it’s symbolic of an effort to move forward and protect the freedoms of everyone, mindful that there can be unintended consequences and sometimes we swing the pendulum so hard to protect some we forget the rights of others, and I don’t think anyone wants that to happen.”

The measure bans discrimination in housing and employment on the basis of sexual orientation or gender identity. It also protects the employment rights of those who oppose gay equality – and are vocal about it – as well as the right of religious organizations to choose who lives in their non-commercial housing. It specifically exempts as an employer the Boy Scouts of America, whose largest single sponsor is the Mormon Church.

The measure was supposed to be released Tuesday but was held up over some details and church officials and national LGBT groups didn’t issue statements of support until Wednesday midday when the measure was actually public.

LGBT and Mormon leaders in Utah have been working for years behind the scenes on their bumpy relationship, culminating in late January with the church’s announcement that it would support non-discrimination legislation — one of the largest U.S. faith groups to do so. They made clear at the time that they would do so only if the religious right to reject gay equality was protected. Some gay rights groups called demands for exemptions a major loophole while others said the announcement reflected powerful, growing common ground between religious liberties and gay equality.

On Wednesday LGBT advocates praised the bill.

“This is all upside. The fact that employers will be prohibited from discriminating, and the fact that the LDS church could work towards common ground should be a model for common ground,” said Fred Sainz, a vice president with the Human Rights Campaign. “Legislation is about compromise. The idea is, were you able to preserve principles important to your community, and the principles most important to our community were preserved and strengthened.”

The Catholic Church and the Southern Baptist Convention – the country’s largest faith denominations — have opposed the federal Employee Non-Discrimination Act, and Southern Baptist leader Russell Moore in January called the Mormon Church “well-intentioned but naïve.” It wasn’t immediately clear Wednesday how groups concerned about the place of religious traditionalists would react. The Becket Fund, a leading religious liberties law firm, declined comment.

Two apostles – or top spiritual leaders – of the Church of Jesus Christ of Latter-day Saints attended the news conference to support the measure. For seven years LGBT advocates put forward anti-discrimination measures and they failed without church support. Most state lawmakers, like state residents, are Mormon church members.

“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,” the Church of Jesus Christ of Latter-day Saints said in a statement. “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.”

Troy Williams, executive director of Equality Utah, said he hoped the measure “will be a model for the nation.”

Our country has been divided unnecessarily between LGBT rights and religious liberties, so people have come together to work through these issues,” he said.

The bill requires concessions from both sides.

It protects people only in housing and employment, but not in the broader category of “public accommodations” – such as retail spaces, hotels and taxis. “We ran out of time,” said Williams, who said advocates’ ultimate goal is “full legal equality in all areas governed by civil law.”

He said research shows that at least 37,000 LGBT people are in the workforce in Utah, “and to have a bill that protects them is huge.” He said legislation to ban discrimination has been introduced in Utah for seven years and failed — without church support.

Traditional groups are likely to view the measure as too narrow.

In its statement in late January saying it supported anti-discrimination measures, the Mormon Church cited as examples of religious persecution things such as public schools refusing to recognize traditional faith student groups or corporate leaders pushed out of their jobs for voicing beliefs against gay equality.

Other Utah lawmakers had proposed broader religious liberties protections for the bill, the Salt Lake City Tribune reported.

In January, LGBT advocates described years of relationship-building and dinners at private homes between the two sides after bitter feelings about the church’s significant support of Proposition 8 in 2008, a measure to ban same-sex marriage in California.

Twenty-one states and Washington, D.C., have anti-discrimination protections in housing and employment on the basis of sexual orientation, and 18 states and D.C. have such protections on the basis of gender identity. If the measure becomes law, Utah would be in those groups.