Two men who married in Massachusetts are finding it hard to get a divorce in Texas, where gay marriages—and, apparently, divorces—are not recognized by the state.

The two men, named in court documents only as J.B. and H.B., were married in September 2006 and moved to Texas in 2008. They reportedly “ceased living together” in November of 2008. J.B. cited “discord or conflict of personalities” and filed for divorce at the time.

But the state opposed the divorce, stating that the couple was not eligible for marriage under Texas law and thus granting a divorce violates state law. Texas is one of 44 states that do not recognize same-sex marriages. The Texas family code states that a marriage license cannot be issued to persons of the same sex.

According to The Dallas Morning News, District Court Judge Tena Callahan ruled in October 2009 that the couple should be allowed to legally dissolve their union. Callahan also ruled the prohibition of same-sex marriages in Texas was unconstitutional because it violated the couple’s right under the 14th amendment to equal protection under the law.

However, the state’s Fifth District Court of Appeals on Aug. 31 ruled to reverse Callahan’s decision. In the court’s opinion, Justice Kerry Fitzgerald wrote that “Texas district courts do not have subject-matter jurisdiction to hear a same-sex divorce case,” and “Texas’ law compelling this result do not violate the Equal Protection Clause of the Fourteenth Amendment.”

Texas Attorney General Greg Abbott applauded the court’s reversal of Callahan’s decision.

“Because the Constitution and laws of the state of Texas define marriage as the union of one man and one woman, the court correctly ruled that Texas courts do not have authority to grant a same-sex divorce,” he said in statement.

Lawyer Peter Schulte, who represented J.B. in the divorce petition, said in an interview that he and his client are “disappointed in the court’s decision, but we respect the court and process and are evaluating our options about moving forward.”