A father will be reunited with his daughter whose wife had given her up for adoption without his knowledge or consent.

The ruling was made by a Utah judge, who said he was "astonished and deeply troubled" by a Utah adoption agency's deliberate move to circumvent the rights of a married man, Terry Achane, an Army drill instructor.

The biological father had been working away from home when the baby was born. The 31-year-old said he and his wife were having marital problems and that she had suggested adoption or abortion, fearing she would be a single mother.

He had encouraged her to keep the baby, but when she gave birth prematurely, she signed away her baby to the Utah family with five kids of their own.

"I was like, 'Utah? Where is Utah?' I'd never been to Utah. She's never been to Utah,'" Achane told The Salt Lake Tribune.

The judge gave the adoptive parents, Jared and Kristi Frei, 60 days to return Achane's daughter. After a two-year legal battle, the girl, whom Achane named Teleah but has only met twice, is supposed to head back to South Carolina.

The Utah parents vow to put up a fight and plan to appeal the judge's ruling. On a blog that tells the story of the baby they call Leah, they write, "We have, as a family, come to know that this dream was a righteous desire blessed to fruition by God, and that Leah would be that child—and yet, little did we know the challenges and trials that awaited us in finding and fighting for this little girl."

The site has raised over $20,000 to pay for legal bills.