In a late night move, Kansas legislators passed a bill that would allow adoption agencies to discriminate against gay or lesbian couples, saying it “protects” the “sincerely held religious beliefs” of the agency.

The state Senate passed the bill around 2am this morning with a 24-15 vote. The House passed it last night 63-58.

Governor Jeff Colyer has said he will sign it into law despite outcry from businesses, activists, and child care specialists. Colyer became governor after Trump tapped former Governor Sam Brownback to lead the Office of International Religious Freedom at the State Department, a position often called the “Religious Freedom Ambassador.”

During his confirmation hearings, Brownback implied that there are circumstances in which executing people for being gay is acceptable. His nomination was opposed by minority religions in this country; his job puts him in charge of promoting the rights of minority religions in other countries.

The measure has been pushed primarily by Catholic adoption agencies who don’t want to place children in homes with gay or lesbian parents. The best interest of the child would be abandoned on the altar of religious dogma.

According to recent studies, Catholic doctrine says homosexuality as an intrinsic evil, but individual Catholics are also overwhelmingly support of LGBTQ rights.

“Catholic Charities and other adoption agencies are key to the fabric of our communities. I look forward to signing this bill because it increases the opportunities for needy children to find loving homes,” Colyer said in a statement.

While most people would think this is an argument in favor of maximizing the number of available parents to take children in, supporters say that religious agencies will their doors instead of placing kids in decent homes that violate the agencies’ “sincerely held religious beliefs.”

A similar bill has passed both chambers of the Oklahoma state legislature and is awaiting Governor Mary Fallin’s signature. She has not indicated whether or not she will sign it.