Following an outbreak of national outrage, a Utah judge reversed his decision to remove a foster child from her adoptive lesbian parents and place her with a heterosexual couple.

On Friday, Judge Scott Johansen released a signed order that will allow the 9-month-old baby to stay with April Hoagland and Beckie Peirce, a married couple who reside in the city of Price, reports The Associated Press. The revised order means that the Utah Division of Child and Family Services will no longer have to remove the baby from the couple's home next week as originally planned.

The judge handed down his initial ruling on Tuesday, arguing that research shows children do better when raised by heterosexual families. However, the American Psychological Association countered that argument, saying there's no scientific evidence to prove that gay couples are unfit parents solely based on their sexual orientation.

Following his decision, Utah officials and the couple filed court challenges against the judge's order.

During an interview with CBS News on Thursday, Hoagland and Peirce said they accused the judge, who is a bishop in the Mormon Church, made the decision based on his religious morality rather than adhering to the law.

"This is all about sexual orientation, not what is best for the child," Peirce said. "He has no other grounds but that."

Hoagland also told KUTV that she "was kind of caught off guard because I didn't think anything like that would happen anymore... It's not fair, and it's not right, and it hurts me really badly because I haven't done anything wrong."

Hoagland and Peirce are one of about a dozen other same-sex married couples in Utah who became foster parents after the U.S. Supreme Court legalized gay marriage across the country last summer.