FILE - In this Jan. 12, 2016 file photo, South Dakota Gov. Dennis Daugaard delivers his during his annual state of the state address at the state Capitol in Pierre. Daugaard vetoed a bill Tuesday, March 1, 2016, that would have made it the first state in the U.S. to approve a law requiring transgender students to use the bathrooms and locker rooms that match their sex at birth. Photo: AP Photo/James Nord, File

FILE - In this Jan. 12, 2016 file photo, South Dakota Gov. Dennis Daugaard delivers his during his annual state of the state address at the state Capitol in Pierre. Daugaard vetoed a bill Tuesday, March 1, 2016, that would have made it the first state in the U.S. to approve a law requiring transgender students to use the bathrooms and locker rooms that match their sex at birth. Photo: AP Photo/James Nord, File

South Dakota Gov. Dennis Daugaard has earned the dubious distinction of being the first governor to sign a law legalization discrimination against LGBTQ people in 2017.

On Friday, Daugaard signed into law a bill that allows adoption agencies to deny LGBTQ families services and child placement for “religious” reasons and makes clear that the state is not to punish or discriminate against agencies that do. That decision stands in contrast to his veto last year of a “bathroom bill” that would have allowed South Dakota schools to decide which restrooms transgender students are allowed to use.

The governor had been silent on the matter before signing the bill until Friday, the Argus Leader reports, when Daugaard said he was concerned about the child-placement agencies facing lawsuits for denying placement to someone in a “protected class,” such as the LGBTQ community.

“I’m worried that a child placement agency may make what is in the best interest of the child a correct decision but be subject to a lawsuit by someone who has a little bit of a leg up by virtue of being in a protective class,” he said. “And if we can forestall that with this legislation then I’m willing to do that.”

However, critics say the new law could actually increase litigation, while preventing children from being placed in loving homes. Families could also be denying for other faith-based reasons, including single parenthood or belonging to a different religion.

“This discriminatory legislation takes South Dakota in the wrong direction, and sends the message that our leaders are more concerned with the desires of religious agencies than the rights of individuals and children in our state,” Libby Skarin, policy director of the ACLU of South Dakota, said in a statement. The organization indicated it plans to file suit once the law goes into effect.

The bill reads, in part:

No child-placement agency may be required to provide any service that conflicts with, or provide any service under circumstances that conflict with any sincerely-held religious belief or moral conviction of the child-placement agency that shall be contained in a written policy, statement of faith, or other document adhered to by a child-placement agency. … The state may not discriminate or take any adverse action against a child-placement agency or an organization seeking to become a child-placement agency on the basis, wholly or partly, that the child-placement agency has declined or will decline to provide any service that conflicts with, or provide any service under circumstances that conflict with the agency’s written sincerely-held religious belief or moral conviction of the child-placement agency. … No provision of this Act may be construed to allow a child-placement agency to decline to provide a service on the basis of a person’s race, ethnicity, or national origin.

Michigan, North Dakota, and Virginia also have so-called “religious exemption” laws relating to adoption and foster care, but South Dakota is the first state to pass such a bill since the U.S. Supreme Court ruled in favor of marriage equality in 2015. Prior to that ruling, adoption agencies in some places with marriage equality — Massachusetts, Illinois, California, and Washington D.C. — opted to end their services altogether, rather than place children with same-sex couples.

Texas, Oklahoma, and Alabama are all currently considering bills that would permit anti-LGBTQ discrimination under the guise of “religious freedom.”