The Texas Senate on Sunday approved a bill that seeks to allow state-funded or private adoption agencies to reject gay parents based on their religious objections.

According to The Texas Tribune, the bill (House Bill 3859) advanced on a 21-10 vote. The House approved the measure earlier this month.

Similar laws have been passed in five other states, but Texas' proposal, modeled after a South Dakota law, would extend to state-funded agencies.

Opponents say the bill would also allow faith-based adoption agencies to reject applicants based on religious affiliation or marital status.

The bill's sponsor, Senator Charles Perry, a Republican from Lubbock, told colleagues that his proposal is “not meant to discriminate” against anyone and repeatedly told Democrats that it would put the child's needs first.

The approval came on the same day that the House gave preliminary approval to a bill that prohibits transgender students from using the bathroom of their choice in public schools.

(Related: Texas House advances transgender “bathroom bill.”)

The American Civil Liberties Union (ACLU) criticized lawmakers' priorities.

“Our lawmakers seem determined to make discrimination Texas' chief export,” Rebecca L. Robertson, legal and policy director for the ACLU of Texas, said in a statement. “The Texas legislature is cynically advancing an aggressive agenda of discriminatory legislation for political gain. The so-called bathroom amendment approved by the House last night is billed as a compromise, but there can be no compromise on discrimination. Transgender children aren’t bargaining chips for lawmakers to trade, and their safety and dignity are non-negotiable.”