The Texas Senate has approved a bill that would allow professionals to discriminate against LGBTQ people.

Senate Bill 17 would bar state professional licensing boards from punishing professionals for breaking rules that violate a “sincerely held religious belief.”

SB 17 has an exception for life-or-death situations and does not apply to police.

Almost all the Texas senate Republicans voted for the bill, along with Democrat Eddie Lucio. Republican Kel Seliger voted against the measure along with most of the Democrats.

Related: Texas adoption agencies could ban gay, Jewish, Muslim parents

“Senate Bill 17 will ensure that anyone can practice their profession in Texas without being forced to compromise their religious faith,” said a spokesperson for Lt. Governor Dan Patrick (R), who introduced the bill.

Patrick has said that SB 17 is one of his priorities, after he spent the past few years rallying Christians in the state for a bill that would have forced transgender people to use the bathroom associated with the sex on their birth certificate.

Almost 50 people spoke against the bill, which opponents said was vague and would allow all sorts of unprofessional behavior since the state can’t legally question the sincerity of someone’s claimed religious beliefs.

“The reality is that a lot of people have done things that were not consistent with being a Christian,” said Texas Senator Royce West (D).

The author of SB 17, Texas Senator Charles Perry (R), said that the bill “does nothing to promote any illegal or discriminatory activity.”

But an amendment proposed by Texas Senator José Menéndez (D) that would have explicitly said that the bill does not allow discrimination based on sexual orientation or gender identity was rejected by the senate.

Several business groups and corporations also signed a letter opposing the bill.

According to the Dallas News, few showed up to support the bill. Patrick shrugged off the lack of support, saying that he “didn’t rally my troops.”

Jill Glover, a Christian counselor, said at a hearing for the bill last month that professionals should be allowed to choose clients with similar values to their own without fear of losing their licenses.

SB 17 passed the initial vote 19-12. It will have to pass a second time in the senate before it gets sent to the house.