Doctors, child care providers, counselors and other state-licensed workers who refuse to provide services based on “a sincerely held religious belief” would be protected under Senate Bill 17.

The Texas Senate on Tuesday gave its initial OK to a bill that civil rights advocates say would give state-licensed workers — including doctors, child care providers and counselors — a free pass to discriminate, especially against people in the LGBTQ community.

Senate Bill 17, filed by state Senator Charles Perry, R-Lubbock, would bar state agencies that issue occupational licenses from penalizing workers who refuse to provide services based on “a sincerely held religious belief.” A worker could still be sued or fired, but the legislation would provide a legal defense in court, Perry said. The state licenses more than 150 types of workers, from cosmetologists to engineers. The bill would not apply in situations with a risk of death or serious bodily injury.

The bill, which has the support of Lieutenant Governor Dan Patrick, has prompted a vocal backlash. Dozens of people testified against the proposal in a committee hearing last week, while only a handful spoke in favor. Echoing the response to the 2017 “bathroom bill,” businesses including Apple, Google and Dell signed a letter opposing the bill, as well as another measure that would endanger local nondiscrimination policies. During debate Tuesday, Perry said he didn’t read the letter and views his proposal as a moral issue rather than an economic one.

SB 17 tentatively passed the upper chamber on a vote of 19-12, with Democrat Eddie Lucio of Brownsville and Republican Kel Seliger of Amarillo bucking party lines. Because the Senate requires a three-fifths majority, the bill would have died without Lucio’s blessing. Two companion House bills have been referred to committees in the lower chamber, but neither has received a hearing.

During floor debate, Seliger questioned whether a state-licensed worker should be able to deny service to a gay couple or a Muslim person. “When do you tell the difference between firmly held religious belief and bias?” he asked. Perry responded that there is “no real definition” of a sincerely held religious belief: “It’s what you practice and what you believe.”

Lucio didn’t comment during floor debate, though he told the Senate Committee on State Affairs last week that he believed the bill “does not discriminate.” His office did not respond to the Observer’s request for comment.

Democratic Senators José Menéndez, Royce West, Carol Alvarado, Chuy Hinojosa, José Rodríguez and Borris Miles called the bill clearly discriminatory. “You can put lipstick on a pig,” Miles said. “Senator Perry, this is a discrimination bill.”

Perry lamented what he called “reverse discrimination” against religious people. After Hinojosa said that the bill gives the government a license to discriminate, Perry replied, “Government is using this same license to discriminate against people of faith in their practice.”

“You’re turning this upside down, because that’s not the way it works,” Hinojosa shot back. “Freedom of religion is to practice whatever religion you want. But it doesn’t give you the authority to discriminate against people.”

Menéndez, of San Antonio, asked Perry whether the proposal would allow a doctor to turn away LGBTQ patients. Perry insisted that the bill wouldn’t target any one group. In an effort to call Perry on his bluff, Menéndez proposed an amendment that would prohibit license-holders from refusing service because of sexual orientation or gender identity. The amendment failed along the same lines the bill passed, with Perry voting against.

Among those testifying against the measure was Lou Weaver, a 48-year-old trans man from Houston who serves as the transgender programs coordinator for Equality Texas. He told lawmakers that his life could be on the line if the bill gives a doctor a free pass to refuse him care for his diabetes. Looking directly at Perry, Weaver said, “You’re telling me I’m not worthy of the same care.” Perry didn’t respond.