By LINDSAY WHITEHURST, Associated Press

SALT LAKE CITY (AP) — A gay couple denied the chance to have a baby using a surrogate challenged a Utah law's reference to heterosexual parents Tuesday in a case that illustrates the legal complications LGBT couples can face when starting families amid a national patchwork of surrogacy laws.

The case came before the Utah Supreme Court after a judge refused to approve the couple's surrogacy agreement. The judge in southern Utah cited references to a mother in the law's requirement that prospective parents prove a woman can't have children without health serious risk before they turn to surrogacy.

That discriminates against male same-sex couples who want to start a family, said Edwin Wall, an attorney for the two men who want to remain anonymous.

Utah Attorney General Sean Reyes won't stand in the couple's way. State lawyers didn't appear before the high court and said in court documents that the law should be read as gender-neutral.

Some state Supreme Court justices, though, questioned whether that is enough or part of the law should be struck down.

"It seems to me we have to resolve this on constitutional grounds," Justice John Pearce said.

The panel did not immediately rule following the Tuesday hearing.

While gay couples still face legal challenges on parenthood, the Utah case appears unique in barring a pregnancy before it begins, said Susan Sommer with the national gay-rights group Lambda Legal.

Nationwide, surrogacy laws are a patchwork even for heterosexual couples, she said.

"Really, the situation is crying out for better, current up-to-date statues that reflect the reality that people are using gestational carriers," she said.

The case from southern Utah's Washington County was first reported by The Salt Lake Tribune.

It isn't the first high-profile case involving lesbian, gay, bisexual or transgender parents in Utah.

A lesbian couple successfully sued after the state refused to put both their names on their child's birth certificate in 2015, shortly after the U.S. Supreme Court legalized same-sex marriage.

Later that year, a judge briefly ordered a baby girl removed from another lesbian couple's foster home so the child could be placed with a heterosexual couple for her well-being. He reversed the decision after a national outcry.