On May 11, Oklahoma became the eighth state to allow state-licensed child welfare agencies to cite religious beliefs in order to discriminate against LGBT people looking to foster or adopt children.

The Sooner State won’t be the last, either: Kansas Gov. Jeff Colyer has already said that he “look[s] forward to signing” a similar bill that has already cleared the legislature.

Both of these laws are notable losses for LGBT advocates in a year that has mostly seen the failure of anti-LGBT bills, as The Washington Post noted this April.

Legal challenges already underway could reverse the rising tide of anti-LGBT adoption bills: Troy Stevenson, executive director for the advocacy group Freedom Oklahoma, told The Daily Beast that they have retained counsel and are “definitely filing” a lawsuit, but still determining the best timing.

The American Civil Liberties Union already has a lawsuit underway against a similar anti-LGBT adoption law in Michigan, which took effect in June 2015.

In February of this year, Lambda Legal filed a lawsuit against the U.S. Department of Health and Human Services on behalf of Fatma Marouf and Bryn Esplin, a same-sex couple who says that they were turned down by the U.S. Conference of Catholic Bishops in their attempt to foster a refugee child, even though the USCCB receives federal money to place these children.

The Lambda Legal lawsuit is federal, but Lambda Legal counsel Currey Cook told The Daily Beast that it has “the same principles at play” as the ACLU suit against Michigan.

“I’m hopeful that between our Marouf case going forward and ACLU’s case, we will have some good decisions soon,” said Cook.

“ They were able to discriminate against same-sex couples on the basis that they couldn’t get married. Now that reason has gone away, so you’re seeing these specific carveouts allowing them to do that with some sort of religious exemption as the supposedly legitimate reason. ”

With several states passing laws like Oklahoma’s following the 2015 Obergefell decision to legalize same-sex marriage nationwide, adoption and foster care have become a battleground once again in the fight for LGBT equality. Before Obergefell, as Cook told The Daily Beast, religiously affiliated adoption agencies had an easy excuse for refusing to place children with same-sex couples.

“They were able to discriminate against same-sex couples on the basis that they couldn’t get married,” said Cook. “Now that reason has gone away, so you’re seeing these specific carveouts allowing them to do that with some sort of religious exemption as the supposedly legitimate reason.”

Oklahoma’s law, for example, allows religiously affiliated child-welfare agencies that receive taxpayer money to deny placement based on their “written religious or moral convictions or policies.”

That language may be broad, but LGBT advocates note that the specific target is obvious: same-sex couples who want to care for the over 100,000 children who are awaiting adoption nationwide.

According to a report prepared by the Movement Advancement Project, Oklahoma joined seven other states in allowing for this specific type of discrimination.

These anti-LGBT laws have been proliferating: Texas passed one in 2017, as did South Dakota and Alabama. Mississippi allowed state-licensed child placement agencies to turn away same-sex couples via the state’s sweeping anti-LGBT law in 2016. Michigan passed an anti-LGBT adoption law in 2015, just before the Obergefell decision.

Prior to that, only two states had passed such laws—North Dakota in 2003 and Virginia in 2012–although historically, other state laws prohibited same-sex couples from adopting outright.

As of March 2016, when a court ruling deemed Mississippi’s law against same-sex adoption unconstitutional, all of those more direct bans on anti-LGBT adoption have been nullified.

In that Mississippi case, as NPR and other outlets noted, the ban on same-sex adoption was found to be in violation of the 14th Amendment’s equal protection clause, which guarantees equal treatment under the law and was successfully applied in the Obergefell case.

The equal protection clause—along with the establishment clause’s ban on “respecting an establishment of religion”—are now the primary tools that LGBT rights groups hope to use against the latest wave of laws targeting same-sex adoption.

At first glance, that legal battle might seem easy: After all, attorneys can simply point to the mountain of court rulings on unconstitutional same-sex adoption bans as precedent.

“A number of courts have struck down those kinds of laws or policies as equal protection violations,” Leslie Cooper, deputy director of the ACLU’s LGBT and HIV Project, told The Daily Beast.

But Cooper noted that the ACLU’s ongoing lawsuit against Michigan, filed last September, addresses a new issue: “This one’s a little different because the context is [that] the state is not prohibiting gay people from adopting, but the state is saying, ‘Hey, contracted agencies doing our public work, you can turn away qualified same-sex couples just because you don’t want to work with them for religious reasons.”

In other words, the state itself may no longer be allowed to turn away same-sex couples directly but they can still give taxpayer money to religiously affiliated agencies who do. Arguing against that practice will require some extra legwork.

Anti-LGBT groups try to make the case that laws like Michigan’s and Oklahoma’s are necessary to ensure there are enough child placement agencies to take contracts.

“ We’ve got 16,000 young people in the state system either looking for foster homes or long-term adoption. We’ve got a real crisis in our child welfare system. ”

But in states like Massachusetts that have banned anti-LGBT discrimination by state-licensed child placement agencies, said Cooper, agencies have either changed affiliation to keep state funding, or been replaced by other agencies who do not turn away couples based on sexual orientation.

“We’ve got 16,000 young people in the state system either looking for foster homes or long-term adoption,” said Stevenson of the situation in Oklahoma. “We’ve got a real crisis in our child welfare system. There has never been a shortage of agencies; there has always been a shortage of families to take these kids in.”

Four days after Oklahoma Gov. Mary Fallin signed the anti-LGBT adoption bill into law, she issued an executive order instructing the state Department of Human Services to “immediately publish a list of Oklahoma licensed adoption agencies on its website who are willing to serve everyone who meets the [DHS] criteria for being a foster or adoptive parent”—an apparent attempt to provide a resource to same-sex couples looking to adopt in the new legislative environment (PDF).

“ They’re ‘magnanimously’ telling us where we’ll be accepted and where we won’t be accepted. That’s more than discrimination—it’s segregation. ”

“It was almost more insulting than the bill,” said Stevenson. “They’re ‘magnanimously’ telling us where we’ll be accepted and where we won’t be accepted. That’s more than discrimination—it’s segregation.”

Indeed, LGBT people looking to foster or adopt children have long relied on informal networks of support to find agencies willing to serve them. That survival tactic has made it difficult for LGBT rights advocates to bring challenges against laws like Michigan’s and Oklahoma’s, which allow religiously affiliated agencies to collect state money while turning away same-sex couples.

“Historically, a lot of LGBT people have just avoided those places,” Cook told The Daily Beast. “Understandably, most people don’t want to intentionally set themselves up for harm or discrimination. They have found out who to go to through word of mouth.”

But LGBT people finding workarounds to laws does not automatically make them constitutional. Cooper noted that the establishment clause bans “religious criteria” from being used to determine “eligibility for government programs.

“Our position is—and I think the law is pretty strong on this—is that this is the case whether [the government] choose[s] to provide those public child welfare services through state employees or whether they instead choose to contract out that work to private agencies and pay them with taxpayer dollars to do it,” she said.

Stevenson told The Daily Beast that Freedom Oklahoma is currently trying to determine whether to challenge the law immediately and “go for an injunction” or to do it in November when they can more conclusively “show harm to individuals.”

The ACLU lawsuit, said Cooper, is “still early” with court argument set for July.

The Lambda Legal case, Cook noted, is “still in its early stages.”

Success in any of these cases would provide valuable precedent for other challenges against any of the eight—and soon to be nine—laws allowing discrimination against same-sex couples in the name of religion. But until that happens, there’s no reason to expect the bills to stop.