The Texas legislature has approved a bill that would allow religious adoption agencies to refuse to provide services to individuals based on their “sincerely held religious beliefs.”

The bill, called the “Freedom to Serve Children Act,” passed in the House with a vote of 93 to 49 in early May, and in the Senate with a vote of 21 to 10 on May 21. It now awaits the signature of Texas Governor Greg Abbott.

Proponents of the bill said the measure is necessary to be able to maintain the religiously affiliated agencies in the state, which make up about 25 percent of the state’s service providers. Religious agencies that provide such services in Texas as well as in other states have cut back in their involvement, and cited concerns that they may face lawsuits if they refuse to provide services to potential parents who are single, LGBT, or non-Christian, for instance.

“Faith-based child-placing agencies should not have to sacrifice their religious convictions when serving foster children and their families, when it is in fact those very convictions that lead them to work with orphans and the vulnerable in the first place,” Gus Reyes, the director of the Texas Baptist Christian Life Commission, was quoted as saying by Christianity Today.

Russell Moore, the president of the Southern Baptist Convention’s Ethics & Religious Liberty Commission, said he is “thankful” for the approval of the bill, and added, “My prayer is that this would continue to the federal level, so that families and communities can protect the vulnerable without surrendering conscience freedom.”

Opponents argue that the measure is discriminatory and prioritizes the needs of the agencies rather than the needs of the child. Many religiously affiliated agencies also receive funding from the government, which was another factor that opponents cited as a point of concern.

“Hundreds of faith leaders from Texas and across the nation have warned that bills like this are about discrimination and hurting people, not protecting religious freedom,” Kathy Miller, president of the Texas Freedom Network, was quoted as saying by Dallas News.

However, supporters rebut that by saying there are still other agencies without religious affiliations that provide the same services.

“This bill doesn’t prohibit particular groups from adopting, it doesn’t establish one faith over another,” Senator Charles Perry, one of the sponsors of the bill, was quoted as saying by the Associated Press.