A judge in Utah has ordered a lesbian couple to give up the infant foster child they were caring for, reportedly telling them that the girl would be better off living with a straight couple, according to The Salt Lake Tribune.

Beckie Peirce, 34, and her wife, April Hoagland, 38, say they were taken aback on Tuesday when 7th District Court Juvenile Judge Scott Johansen ordered the girl removed from their care and placed in another home within seven days.

"He said through his research he had found out that kids in ... homosexual homes don't do as well as they do in heterosexual homes," Hoagland said in a Reuters video.

Johansen was questioned about that research by the Utah Division of Child and Family Services but provided no specifics, the couple said.

Mandie Torgerson, an attorney representing the baby's biological mother, also said Johansen did not cite the research he referred to, saying only that "myriad" studies support his order.

Torgerson said her client, who wants the couple to care for the baby, is upset and will appeal the order at an upcoming hearing, according to KUTV.com.

A copy of the judge's order has not yet been made public, but a court spokeswoman confirmed its contents, the Tribune reported.

The case has attracted the attention of Hillary Clinton, who tweeted a message of support, saying "Being a good parent has nothing to do with sexual orientation — thousands of families prove that."

The two women, who have cared for the child during the past three months, have hired an attorney. Hoagland said in the video that they are prepared to fight to have the child returned to them:

"We've been told to care for this child like a mother would, and I am her mother. I mean, that's who she knows and she's just going to be taken away in seven days, to another probably good loving home, but it's just, it's not fair and it's not right and it just hurts me really badly."

The couple is already raising Peirce's two biological children and said they have been asked by the girl's biological mother to adopt her.

Updated at 8:15 p.m. ET with state challenge:

The Associated Press reports that state officials say they will try to get the judge's order changed.

"Utah Division of Child and Family Services officials said Thursday in a statement that they will fight the ruling at the appeals court if Judge Scott Johansen doesn't rescind his decision."The state agency said the judge went against its recommendation that the 9-month-old baby should stay with April Hoagland and Beckie Peirce, a married couple in Price, Utah."Copyright 2016 NPR. To see more, visit http://www.npr.org/.