AUSTIN, Texas — Many state-funded Texas adoption and foster care agencies routinely deny non-Christian, gay, and unmarried applicants on religious grounds — and legislation that got initial approval in the state House on Tuesday is designed to protect them from potential lawsuits from doing so.

The private organizations, which are paid by the state to place foster children with adoptive families, want to continue the practice and are seeking legal protections through Texas’ “Freedom to Serve Children Act,” which the GOP-controlled chamber approved 94-51 late Tuesday night.

A final vote will be needed Wednesday to send the measure to the state Senate, which is even more conservative.

The bill would be the nation’s second allowing state-funded adoption agencies to reject families on religious grounds. South Dakota passed similar legislation in March but it’s too soon to measure its practical effects. While the Texas proposal may not pass constitutional muster, that hasn’t stopped the state’s lawmakers before, who have in recent years approved a voter ID law and abortion restrictions that were overturned in court.

Randy Daniels, vice-president of Child and Family Services for the Dallas-based Christian child welfare organization Buckner International, said religious agencies are terrified of lawsuits for turning away parents.

“We want to make sure we can practice within the framework of our sincerely held religious beliefs,” said Daniels.

Buckner only accepts Christian heterosexual couples who have been married for at least four years, in addition to some single individuals — which is more liberal than many other faith-based groups, which refuse single parents, said Daniels.

“These are our requirements, and we’re clear, this is just who we are,” said Daniels. “We want to make sure that groups like Buckner continue to have a place at the table because we bring solutions.”

READ NEXT: LGBTQ groups fear Tennessee bill would roll back civil rights

Republican sponsors of Texas’ bill say it is designed to retain providers by shielding them from possible court fights.

“We want to make reasonable accommodations so everyone can participate in the system,” said state Rep. James Frank of Wichita Falls. “Everyone is welcome. But you don’t have to think alike to participate.”

Megan Lestino, vice-president of public policy for the National Adoption Council, said she knows of faith-based adoption agencies denying LGBT and other prospective parents around the country — which upsets families but does not violate the law unless the state fails to present other options.

“Equal protection requires that there’s another option for every family,” said Lestino. “And there typically is some option for every family.”

Four states have passed legislation protecting private adoption agencies only, which Cooper said was seen by some to “codify” existing practices and fall within legal limits. South Dakota, and now Texas, seek to go further.

Frank said his bill directs state child services to ensure that other outside adoption providers without religious objections are made available to help would-be adoptive parents who get turned away by any who do raise objections.

But Rebecca Robertson, the American Civil Liberties Union of Texas’ legislative and policy director, said the state — whose only faith providers are Christian — is lacking in such options.

“If organizations are turning people away and those people are unable to be served that’s a violation,” she said. “I know this bill would make that happen at multiple levels in this state welfare system.”

Robertson also said the proposal violates the Constitution since it involves taxpayer dollars.

“When Texans come to the table, the government has to treat all Texans the same,” she said. “This is state-sponsored discrimination.”

During lengthy debate, opponents said the measure fails to prioritize the needs of adoptive and foster children.

“I truly want to see something that doesn’t create so much concern and fear,” said Rep. Donna Howard, an Austin Democrat. “That we recognize there are a wide variety of beliefs and non-beliefs and all should be guaranteed services and should not be denied services on the basis of their beliefs or of their gender identity.”

The chamber’s Republican majority defeated Democratic modifications to the bill that would have required adoption agencies to document their rejection of families.

“It’s one thing to protect providers’ rights to refuse to provide a service they do not agree with, but I also want to make sure the kids are protected,” said Rep. Eddie Rodriguez, also a Democrat from Austin, who proposed one such unsuccessful amendment.

Frank said his bill was designed to draw as many participants as possible into adoption and foster care and said those who say the bill is discriminatory misunderstand it.

“I hope the message that gets tweeted out at the end of this is that Texas is open for anybody and everybody,” said Frank.