Despite opposition from a coalition of businesses including Amazon, Google and Apple, the Texas Senate approved a controversial religious liberty bill on Tuesday that some civil rights groups say is the biggest threat facing the gay community in Texas during this legislative session.

State Sen. Charles Perry, a Lubbock Republican, said Senate Bill 17 protects licensed professionals such as doctors, accountants, lawyers and counselors from disciplinary action from state boards when they act on their “sincerely held religious beliefs” in their places of business.

Perry said in the current political climate in America, he fears Christians can't practice their faith openly in the public square without facing consequences, which could include losing their ability to make a living.

“We’re waking up in an era where Christian faith, specifically, seems to be under attack,” said Perry, who is an accountant.

Opponents are calling it the “license to discriminate bill,” and say it would allow those professionals to deny services to people who are gay or of different faiths.

“What if somebody said, ‘I am not going to provide a service because you are a gay couple?’” asked State Sen. Kel Seliger, an Amarillo Republican, as the bill was debated in the Senate. “Doesn’t this bill essentially provide a defense of that discrimination or discriminatory behavior?”

RELATED: Apple, Google, Facebook rebuke ‘divisive’ anti-LGBT bills in Texas Legislature

Perry, who says he is not trying to discriminate against anyone, refused to accept an amendment offered by state Sen. Jose Menendez, D-San Antonio, that would have clarified that the bill would not allow a professional to decline clients based on their sexual orientation. That amendment failed by an 18-13 vote.

The bill was approved by the Senate on a 19-12 vote. It needs one more procedural vote to be sent to the Texas House, where it will face its real test.

Despite fervor from the House’s conservative wing in 2017, that chamber refused to pass a so-called “bathroom bill” that would have restricted the public restrooms transgender people can use.

Since then, Democrats have gained a dozen seats in the House. Newly elected House Speaker Dennis Bonnen has said he does not want to see another bathroom bill this year. He has derailed other red meat social issues by assigning legislation to committees where it will likely fail — which is what happened to a bill that would have banned an abortion once a fetal heartbeat is detected, which went to a committee chaired by a Democrat.

A companion bill to SB 17 that was filed in the Texas House, HB 2827, by Rep. Phil King, R-Weatherford, is being reviewed by the House State Affairs Committee, but it has not had a public hearing yet.

Tuesday’s Senate vote brought condemnation from Equality Texas, the largest statewide organization for LGBTQ rights.

“Religious freedom is a fundamental American value protected in our U.S. Constitution,” said Samantha Smoot, the group’s interim executive director, in a statement. “But religious freedom was never intended to be a license to discriminate. SB 17 would create a religious litmus test, and open the doors to discrimination and to real harm to LGBTQ Texans.”

Lt. Gov. Dan Patrick, who oversees the Texas Senate, has declared the bill one of the 30 priority items for the 2019 Legislative Sessions.

“Today’s vote on SB 17 marks a dark moment for Texas: the passage of one of the most broadly discriminatory bills under consideration across the country,” said Rebecca Marques, Human Rights Coalition Texas state director. “This bill would allow state-sanctioned discrimination against many Texans, but would particularly impact the LGBTQ community.”

Businesses, visitors bureaus and chambers of commerce from around the state last week came out in opposition to SB 17 and other bills that could discriminate against people based on their sexual orientation.

“Such measures are inconsistent with an innovative, forward-facing Texas that we can all be proud of,” says a letter supported by Apple, Amazon, Google and more than a dozen other companies.

When asked about the opposition from the business groups, Perry responded: “I don’t pay homage to the almighty dollar.”

Perry also said suggestions that he condones discrimination are hard to take. He said he’s taught by his faith to be compassionate and understanding.

“It’s frustrating because that’s not who I am,” Perry said. “I’ll tell you my personal faith is this, I live under a rule that’s very clear and sexual morality, murder and all of those things are outlined clearly for me.”

Staff writer Andrea Zelinski contributed to this report.