Earlier in the week, Juvenile Court Judge Scott Johansen had directed married foster parents Rebecca A. Peirce, 34, and April M. Hoagland, 38, to give up the baby girl they had raised for three of her nine months. According to the women, he said studies (which he did not identify) support the contention that children do better in households headed by heterosexual couples.

After an outcry ensued, the judge reversed course today, scheduling a hearing on Dec. 4 to determine what is in the best interest of the child.

Politicians on both sides of the aisle had criticized the judge's ruling. Utah Gov. Gary Herbert, a Republican, said the judge should not "inject his own personal beliefs and feelings in superseding the law."

Hillary Clinton tweeted in support of Peirce and Hoagland: "Being a good parent has nothing to do with sexual orientation — thousands of families prove that."

The Utah Division of Child and Family Services filed a petition for a stay of the judge's order. "It is our position that this removal is not in the best interests of the child," DCFS officials said in a statement, according to the Salt Lake City Tribune.

Until this year, Utah law barred same-sex couples from adopting or fostering children. That changed when the U.S. Supreme Court upheld the right of gay couples to marry.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.