An Arizona appeals court has decided a transgender man can pursue a divorce from his wife, reversing a decision from a lower court judge who refused to end the marriage.

The court ruled that Thomas Beatie’s 2003 Hawaii marriage to his wife Nancy is valid under Arizona law and not considered a same-sex marriage.

Last year, a lower court ruled that the marriage was considered a same-sex marriage and therefore not elligible for recognition under Arizona’s same-sex marriage ban.

Thomas Beatie gained national attention as “The Pregnant Man.” Beatie gave birth to the couple’s three children when his wife could not become pregnant.

Over a year ago, the lower court ruled the marriage was a same-sex union because it was between a woman and a person capable of giving birth.

That court also ruled there was insufficient evidence that Beatie was a man at the time of the couple’s marriage, even though his driver’s license and birth certificate had been changed to accurately reflect Beatie’s gender identity by 2003.

The state appeals court on Wednesday ruled Beatie’s marriage was valid, noting he did not withhold the fact that he is transgender from Hawaii officials when the couple wed.