A Utah judge who ruled on Tuesday that a 9-month-old foster child be removed from the home of a married same-sex couple and instead be placed with heterosexual parents, reversed his ruling on Friday after pressure from state officials, according to Ben Winslow, a reporter for Salt Lake City television station Fox 13.

In an order obtained by @fox13now, Judge Johansen canceled his decision to remove the child from lesbian couple’s home. #utpol #LGBT — Ben Winslow (@BenWinslow) November 13, 2015

The judge scratched his order that the child be put in a heterosexual couple’s home. @fox13now #utpol #LGBT pic.twitter.com/H9Uvx5EJ2F — Ben Winslow (@BenWinslow) November 13, 2015

The judge WILL allow the foster child to remain with the lesbian couple. @fox13now #utpol #LGBT pic.twitter.com/9djWoFzNMi — Ben Winslow (@BenWinslow) November 13, 2015

Judge Johansen has set hearings on the foster child at the end of the month and in December.

@fox13now #utpol #LGBT — Ben Winslow (@BenWinslow) November 13, 2015

The New York Times also reported that the judge reversed his order, but indicated that the couple’s fight to keep the child may not be over:

Judge Johansen eliminated a line saying that “it is not in the best interest of children to be raised by same-sex couples,” and another ordering the child removed and placed with a heterosexual couple. But the new order still says, “The court cited a concern that research has shown that children are more emotionally and mentally stable when raised by a mother and father in the same home.” And there is still a Dec. 4 hearing scheduled on the best interests of the child.

District Court Juvenile Judge Scott Johansen ruled on Tuesday that the child be removed from the foster home of Beckie Peirce and April Hoagland, citing unspecified research that shows children are better off with traditional parents.

Utah Gov. Gary Herbert (R) said on Thursday that he was “puzzled” by the ruling, and he urged the judge to follow state law, which allows gay parents to adopt children. The Utah Division of Child and Family Services (DCFS) and the foster parents then filed petitions asking the judge to reverse his order.