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.

Governor Gary Herbert, who pledged last week to sign the bill, will do so at the state capitol during a special ceremony at 6pm, according to the governor’s spokesman, Marty Carpenter.

The state’s Republican-controlled legislature gave final approval to the proposal late on Wednesday night, 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 Representative 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 unveiled last week and passed by the senate on Friday. It has 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 was 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 have 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.

Representative 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 organisations 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 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 on 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 on Wednesday, calling it a good balance between protecting religious rights while accommodating gay couples who wish to marry.

Republican senator 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 on Wednesday that his organisation is now neutral on the bill after Adams addressed their concerns.

Several conservative organisations spoke in favour of the bill on Wednesday, and the Mormon church issued a statement of support for the proposal.

It is unclear whether the governor would support the marriage bill.