Last week, South Dakota governor Dennis Daugaard signed a bill into law that allows taxpayer-funded adoption agencies to deny services to LGBT people. The bill, known as SB 149 and framed by lawmakers as a protection of religious rights, specifically states that religious-based adoption agencies can turn away people who behave in a way that conflicts with their “written sincerely-held religious belief or moral conviction.” SB 149 makes it clear that adoption agencies can’t discriminate against people based on race, ethnicity, or national origin—but makes no mention of sexual orientation.

The law is portrayed as a way to protect religious freedom, but “everything we know about religious exemption laws points to the fact that they’ll be used to discriminate against LGBT people,” Ryan Thoreson, Yale Law School Robert L. Bernstein International Human Rights Fellow at Human Rights Watch and author of Transnational LGBT Activism: Working for Sexual Rights Worldwide, tells SELF.

Human-rights groups like the American Civil Liberties Union (ACLU) and Lambda Legal immediately responded, calling the bill “anti-LGBT.” Sarah Kate Ellis, president and CEO of GLAAD, also had this to say on Twitter:

Children will be the ones to suffer.

Sarah Warbelow, legal director for Human Rights Campaign, said in a statement to SELF that she’s concerned that children who are waiting to be adopted will ultimately suffer. “These children could now wait longer to be placed in a safe, loving home at the whim of a state-funded adoption or foster-care agency with a vendetta against LGBTQ couples, mixed-faith couples, or interracial couples—all while being taxpayer-funded,” she said.

Not only that, she points out that LGBTQ children in South Dakota’s foster-care system are at risk of staying in a system that doesn’t recognize their identity and “actively works against the child’s well-being by refusing to give them appropriate medical and mental health care.” “There is a never a legitimate reason to allow an adoption agency to focus on anything other than the best interests of a particular child and on finding the best available home for that child," Shannon Minter, legal director for the National Center for Lesbian Rights, tells SELF.

The law is legal but iffy because it allows government-funded discrimination.

The law also doesn’t impose any limits on what those beliefs may be, Minter points out. “While it is clear that the motivation behind the law is to enable agencies to discriminate against same-sex parents, the law is unlimited and would also allow agencies to discriminate based on beliefs about women, interracial couples, or persons from other religious faiths,” he says. “This is a dangerous path to go down, and it is very unfortunate that South Dakota has enacted such a radical law.”