Foster parents April Hoagland and Beckie Peirce are photographed on Nov. 11, 2015 in Salt Lake City.  (Steve Griffin/The Salt Lake Tribune via AP)

A Utah judge has put a hold on his order to remove a foster child from the home of a married lesbian couple, whom he had said were unfit to keep the girl because of their sexual orientation.

Judge Scott N. Johansen, a juvenile court justice in eastern Utah, struck language from his original order requiring that the 9-month-old be removed from the home within a week “in favor of a heterosexual foster adoptive placement.” He has set a hearing for Dec. 4 to determine the best interests of the child.

[Utah judge removes lesbian couple’s foster child, says she’ll be better off with heterosexuals]

The original order to remove the child from the home of the Carbon County couple drew an outcry from around the country, with former secretary of state Hillary Rodham Clinton chiming in and even the state’s Republican governor declaring himself “puzzled” and concerned that Johansen was not following the law.

The couple, Beckie Peirce and April Hoagland, had said the judge cited “research” suggesting children do better in homes with heterosexual parents. But major medical associations, such as the American Psychological Association and the American Academy of Pediatrics, have said sexual orientation is unrelated to one’s ability to be a good parent.

In his revised order, Johansen struck language that cited the court’s “belief” that same-sex marriages are less stable than heterosexual ones, and that children of such relationships have emotional problems. But it still cites the court’s “concern that research has shown that children are more emotionally and mentally stable when raised by a mother and a father in the same home.”

Calls to the couple’s attorney, James Hunnicut, were not returned Friday.

Peirce and Hoagland had taken in the baby three months ago, according to Utah’s Division of Child and Family Service. The agency has placed numerous children with gay couples since same-sex marriage became legal in Utah two years ago, and had appealed Johansen’s decision. The pair were moving toward adopting the child, with the blessing of her birth mother, agency officials said.

Ashley Sumner, a spokeswoman for the agency, said officials there were pleased with the decision.

“We are relieved that the judge vacated that part of the order that would have forced us to remove the child on Tuesday,” she said. “This has bought us some time, and we’ll see what happens Dec. 4 at a best interest hearing.”

Troy Williams, executive director of Equality Utah, a gay rights group, also expressed relief.

“We’re very happy to see movement on this issue, and we’re looking forward to a swift and happy resolution to this case,” he said.

"It's not fair and it's not right and it just hurts me really badly," said April Hoagland, sitting next to her wife, Beckie Peirce. A judge ordered that their foster child be removed from their Carbon County, Utah, home and placed with a heterosexual couple instead. (Reuters)