Thomas Beatie was born a woman and underwent a double-mastectomy but retained female reproductive organs and gave birth to three children.

Gerlach said he had no jurisdiction to approve a divorce because there’s insufficient evidence that Beatie was a man when he married Nancy Beatie in Hawaii.

Beatie is eager to end his marriage, but the couple’s divorce plans stalled last summer when Gerlach said he was unable to find legal authority defining a man as someone who can give birth.

“The decision here is not based on the conclusion that this case involves a same-sex marriage merely because one of the parties is a transsexual male, but instead, the decision is compelled by the fact that the parties failed to prove that (Thomas Beatie) was a transsexual male when they were issued their marriage license,” he wrote in Friday’s ruling.

Gerlach’s ruling also said it didn’t address whether Arizona law allows a person who was born female to marry another female after undergoing a sex change operation.

The National Center for Lesbian Rights, which isn’t involved in the Beatie divorce case, has said courts have declared marriages involving a transgender person invalid in a handful of cases across the country, but that those cases had different factual and legal issues than those in the Beatie case.

A then-pregnant Thomas Beatie in a 2008 photo.

Beatie, known as “The Pregnant Man,” was born Tracy Lehuanani Lagondino in Oahu, Hawaii. He began testosterone treatments in 1997 and underwent double mastectomy and chest reconstruction surgery in 2002. He changed his Hawaii driver’s license to say he was a man and had a Hawaiian court approve his name change to Thomas.

Gerlach’s ruling noted that Thomas Beatie halted the testosterone treatments and that he didn’t provide documentation for any additional non-surgical efforts.

Thomas Beatie married his partner Nancy in early 2003 in Honolulu and became pregnant because Nancy was unable to have children. Thomas Beatie conceived with donated sperm and gave birth to children who are now 4, 3 and 2 years old. The couple eventually moved to Arizona.

Beatie has garnered a range of media attention, making the rounds on talk shows such as Larry King and Oprah Winfrey and winning a spot on Barbara Walters’ list of “10 Most Fascinating People” in 2008, alongside President Barack Obama, conservative commentator Rush Limbaugh and swimmer Michael Phelps.

He also published a book, “Labor Of Love: The Story of One Man’s Extraordinary Pregnancy,” the cover displaying an image of a shirtless Thomas sporting facial hair and ho lding a hand over his bare pregnant belly.