A Mormon-church-backed anti-discrimination bill that protects LGBT Utah residents and religious rights is set to be signed by the state's Republican governor on Thursday evening.

Gov. Gary Herbert, who pledged last week to sign the bill, will do so at the state Capitol during a special ceremony at 6 p.m., according to the governor's spokesman Marty Carpenter.

The state's Republican-controlled Legislature gave final approval to the proposal late Wednesday night, with the House of Representatives voting 65-10 to pass the bill.

"I'm not asking you tonight to condone the lifestyle that you don't believe in. I'm not asking you to give rights to them to preserve their lifestyle. In the narrowest form, I 'm asking you to guarantee their rights, the same rights you and I have today," said Rep. Brad Dee, a Republican from Ogden who is one of the sponsors of the bill.

When the bill passed, a crowd that packed the House gallery gave a loud cheer and standing ovation.

The bill was first unveiled last week and passed by the Senate on Friday.

It's earned a rare endorsement from the Utah-based Church of Jesus Christ of Latter-day Saints, which has helped fast-track the measure through the Legislature.

Many Utah lawmakers and the governor are members of the church.

Conservative opponents have argued that the proposal, which is limited to housing and employment, doesn't go far enough to protect religious rights.

The bill doesn't address thornier discrimination questions about whether a business can refuse to serve someone for religious reasons, such as a wedding photographer who objects to photographing a same-sex marriage.

Critics have also argued that the bill creates special protections for gay and transgender people.

The Mormon church said it is fully behind the legislation, which follows the principles set out in its call for laws that balance religious rights and protections for lesbian, gay, bisexual and transgender people.

The church's support for the measure comes as the faith's leaders have softened their tone in recent years regarding same-sex attraction. While moving away from harsh rhetoric and preaching compassion and acceptance, the LDS church insists it is not changing doctrine and still believes sex is against the law of God unless it's within a marriage between a man and a woman.

LGBT advocates who've been pushing the issue at Utah's Legislature for more than half a dozen years have celebrated the church's endorsement, which has offered the kind of broad support they need to pass an anti-discrimination law in conservative Utah.

The bill would make it illegal to base hiring, firing and other employment decisions based on someone's sexual orientation or gender identity.

It would also make it illegal to refuse to sell or rent, to deny a home loan, or to base other housing decisions because someone is LGBT.

Rep. Jeremy Peterson, an Ogden Republican who voted against the bill, said as a property manager, he rents to gay people and he doesn't think there's a need to a law protecting their right to housing.

"The free market is working in this. Landlords do what they're paid to do, which is fill vacancies and collect rents," he said.

Religious organizations and their affiliates such as schools and hospitals are exempt from the law, as is the Boy Scouts of America, which has a ban on gay adult Scout leaders and has close ties to the LDS Church.

For religious rights, the bill allows for people to express their beliefs in the workplace without retribution as long as they are not harassing someone and the speech doesn't interfere with the company's core business.

For example, if a company offered wedding planning services specifically tailored to same-sex ceremonies, an employee would not be able to express their views opposing against gay marriage.

It allows employers to adopt "reasonable dress and grooming standards" and "reasonable rules and polices" for gender-specific restrooms and other facilities, as long as they also accommodate transgender people.

Lawmakers say they specifically didn't define a "reasonable" regulation in order to give employers flexibility to find a solution to their situation.

Later Wednesday night, the House voted 66-9 to approve a bill that allows county clerks to refuse to marry same-sex couples for religious reasons. But the bill requires a county clerk's office to designate someone who will marry all couples, including gay couples, if the clerk opts out.

The 11 members of the House Judiciary Committee approved the measure earlier Wednesday, calling it a good balance between protecting religious rights while still accommodating gay couples who wish to marry.

Republican Sen. Stuart Adams sponsored the bill and said it guarantees same-sex couples will be able to find someone to marry them in each county.

LGBT advocates initially opposed Adams' bill when it included broader religious protections.

Equality Utah's executive director, Troy Williams, said Wednesday that his organization is now neutral on the bill after Adams addressed their concerns.

Several conservative organizations spoke in favor of the bill Wednesday, and the Mormon church issued a statement of support for the proposal.

It's unclear whether the governor would support the marriage bill.

___

Follow Michelle L. Price at https://twitter.com/michellelprice