A federal judge on Thursday ruled in favor of a Michigan adoption agency opposed to placing children with LGBT couples.

District Judge Robert Jonker issued a preliminary injunction blocking Michigan from canceling contracts with adoption agencies that refuse to place children with LGBT couples.

The state in March announced the policy following the resolution of a 2017 lawsuit filed by two lesbian couples.

The Becket Fund for Religious Liberty sued on behalf of Lansing-based St. Vincent Catholic Charities, two adoptive parents and a former foster child who was adopted, the AP reported. Attorney General Dana Nessel, an openly gay Democrat, is a defendant in the case. Nessel helped craft the legal settlement that resulted in overturning the state's stance.

Jay Kaplan, staff attorney for the ACLU of Michigan's LGBT Project, said that the ruling would “allow agencies [in Michigan] to turn away same-sex foster parents who are able to provide supportive and loving homes for those children.”

“Today's ruling requires the state to put the individual religious beliefs of foster care agencies ahead of the welfare of children,” he added.

The state has not said whether it would appeal the decision.