HELENA, Montana — The Montana House passed a bill Thursday that would allow people to challenge government regulations that interfere with their religious beliefs.

The approval, on a 59-38 vote, came a day after lawmakers rejected an amendment that would have made it clear the law couldn’t be used to justify discrimination.

The bill has already passed the Senate and now goes to Gov. Greg Gianforte’s desk for his signature. In testifying before the House Judiciary Committee in March, Lt. Gov. Kristen Juras said the governor supports the bill and “emphasizes this is not a license to discriminate against the LGBT.”

Under the Religious Freedom Restoration Act, the government would have to prove any regulations that substantially interfere with someone’s religious beliefs are justified by a compelling state interest and are being accomplished by the least restrictive means possible.

The LGBTQ community opposes the bill, arguing it could lead to challenges against ordinances in several cities that prohibit discrimination on the basis of race, religion, sex, age, sexual orientation, gender identity and gender expression. The Montana Human Rights Act does not prohibit discrimination based on sexual orientation, gender identity or gender expression.

Republican bill sponsor Sen. Carl Glimm of Kila has said religious freedom laws have been used to prevent things like criminal prosecution of Native Americans for possessing eagle feathers for religious reasons and to prevent schools from requiring Native American children to cut their hair in violation of their religious beliefs. He said his bill is not an attempt to allow challenges to non-discrimination ordinances.

Because opponents repeatedly said the bill is meant to protect religious rights, not overturn non-discrimination ordinances, House Minority Leader Kim Abbott of Helena sought to amend the bill Wednesday to say it could not be used to challenge such ordinances or the protections granted under the Montana Human Rights Act.

Republican Rep. Frank Garner of Kalispell urged support for the amendment, saying: “Because I suspect we will pass this bill today, I support this amendment if it gives comfort to those people who feel they will be subject to it.”

Republican Rep. John Fuller of Whitefish opposed the amendment, saying: “Do not make me NOT do what my God tells me I have to do.”

The amendment failed on a 47-53 vote.

Supporters noted that the federal Religious Freedom Restoration Act was passed in 1993 by a Democratic Congress, including then-Sen. Joe Biden, and was signed by President Bill Clinton, also a Democrat.

Opponents said more than 300 Montana businesses and organizations oppose the legislation and that other states that have passed similar measures have faced economic backlash.

“From a small brewery in Columbia Falls to one of the largest beer companies in the world that buys our barley, businesses do not like this bill and they would like it to go away,” Democratic Rep. Katie Sullivan of Missoula said on Wednesday. “I think we should follow their lead and listen. If it is our goal to make Montana business-friendly, this bill moves us in the wrong direction and will make us known for discrimination instead of entrepreneurship.”

The Human Rights Campaign urged the governor to veto the legislation Thursday.

“Governor Gianforte was elected in part on the promise of bringing new businesses and industries to Montana,“ Alphonso David, president of the Human Rights Campaign, said in a statement. “He should seriously consider vetoing this legislation, which would not just discriminate against LGBTQ people, but threaten to ward off the very businesses he is hoping to attract.”