A Phoenix woman who preserved fertilized embryos before undergoing cancer treatment cannot use them without the consent of her ex-husband and must donate them instead, the Arizona Supreme Court has ruled.

In an opinion released Thursday, the five justices who considered the case reversed an Appeals Court decision that found Ruby Torres' right to have a child outweighed her ex-husband's desire not to be a father.

Torres, 39, decided to freeze her eggs in 2014 after she was diagnosed with bilateral breast cancer. An oncologist told her she likely wouldn't be able to have children after chemotherapy.

She asked her then-boyfriend, John Terrell, to serve as the sperm donor "and, after initially declining, he agreed," according to court documents. The couple signed an agreement at the fertility clinic saying the embryos could not "be used to create a pregnancy without the express, written consent of both parties" if the couple split up.

Torres and Terrell married within days of signing the agreement, but divorced three years later. During the divorce proceedings, Terrell asked the Maricopa County Superior Court to stop Torres from becoming pregnant with the embryos, and the court ordered Torres to donate the embryos to a third party.

Vice Chief Justice Ann Timmer wrote the Supreme Court opinion reaffirming the Superior Court's decision, with Justices Bill Montgomery, Andrew Gould, Clint Bolick and John Lopez joining her.

"We are cognizant of the unavoidable emotional fall-out attendant to the disposition of the embryos here," Timmer wrote. "But the family court was required to enforce the parties’ chosen disposition of the embryos as set forth in the agreement (signed at the fertility clinic.)"

The parties checked a box "that left open the option of one party using the embryos if both agreed at the time their relationship ended and directed donation of the embryos if an agreement could not be reached." Because Torres and Terrell can't agree, "the court could only direct donation of the embryos," Timmer wrote.

The Supreme Court also declined to award Torres attorney fees.

Attorney for Torres: 'We didn't expect this'

Stanley Murray, who argued Torres' case, told The Arizona Republic he "of course" was "not too happy" about the decision.

"I haven't had a chance to speak to my client yet, but I know how she probably feels after what she’s been through," he said. "It's disappointing, because we had gotten the Court of Appeals on our side."

Murray said he was surprised the state Supreme Court agreed to review the case in the first place, since a state law passed in 2018 with Torres' case in mind requires courts to give viable embryos from divorced couples to the parent who wants a child going forward.

"We didn’t expect this (outcome)," he said, adding that he wasn't sure whether Torres would appeal to a higher court outside of Arizona.

ALLHANDS: AZ Supreme Court ruled who gets embryos, but this case has no winners

Cathi Herrod, president of the conservative advocacy group Center for Arizona Policy, said she was "heartbroken for Ruby Torres today," because "she will not be able to bring her children to birth and raise them as she so desired."

Herrod said she hoped "no other parent will suffer as Ruby is suffering" now that the 2018 law is in effect.

That statute releases the partner who doesn't want to procreate from any obligations. Because the law didn't exist when Torres' case began, though, Terrell could've had to pay child support if Torres used the embryos to give birth to a child.

"That would've been crazy," said Eric M. Fraser, Terrell's attorney. "When parties agree ahead of time what to do with their embryos, we think courts should respect those agreements and enforce those contracts. No one should be forced to become a parent against their wishes."

Fraser said he believes the ruling "will have a big impact" despite the 2018 law, because "there are still open questions about the scope of the new legislation."

"Couples everywhere really struggle with fertility issues, and the idea here was to donate these to another couple so they can start their own family," he said. "We were expecting the court to rule our way."

Reach the reporter at maria.polletta@arizonarepublic.com or 602-653-6807. Follow her on Twitter @mpolletta.

Support local journalism. Subscribe to azcentral.com today.