It’s heartbreaking to think that a state has erased the parents of children and put a family in legal jeopardy, simply because of discrimination against gay and lesbian couples. But that’s what happened to a gay couple in Texas after what they described as the “magical” birth of their twin boys.

Jason Hanna and Joe Riggs are the proud fathers of Lucas and Ethan, who were born in April, after they’d connected with a surrogate mom, CharLynn.

Each of the men is a biological father to one of the babies. But, because Texas has a ban on gay marriage (it was ruled unconstitutional by a federal judge last February, but the decision was stayed pending appeal), and because a judge can use his or her own discretion in these cases, neither of the men is currently on the birth certificates of either of the boys, nor have they been able to co-adopt each other’s biological child.

Gay Father Explains How He and Husband Have No Legal Rights To The Others Child by SiriusXM News & Issues

Only the surrogate mother — who has no biological relationship to the boys, since embryos were transferred to her — is on the birth certificates. In essence, the men are not legally defined as the parents of their own children. And though they have DNA tests for proof, they’re worried, particularly if something were to happen to one of them while the other still has not been able to co-adopt the other’s biological child.

Gay Father Explains How He and Husband Petitioned TX Judge For parenthood Of Their Twins by SiriusXM News & Issues

“As of right now in Texas two men cannot be on the birth certificate,” Jason Hanna explained in an interview with me on SiriusXM Progress. “So our attorney followed the letter of the law. We petitioned the court. We had DNA testing there [in court] and petitioned the judge to ultimately remove the surrogate mother from the birth certificate, who has no biological ties to the boys. We would like each biological dad to be placed on the birth certificate of our own son, and then ultimately proceed to the second-parent adoption. The entire petition was denied.”

Jason Hanna and Joe Riggs met four years ago and knew they wanted to be together and raise children, so they saved their money, knowing it would be a costly process. They married last July in Washington DC, where gay marriage is legal, and then went back to Dallas to celebrate their wedding with family and friends in August. They found a surrogate mom, and this past April the twins were born.

“We were sworn in and ultimately the judge was saying that with the information she had in front of her, under Texas law she couldn’t grant it,” Riggs said of their appearance in court last week. “I was shocked. We had a ton of questions as we walked away from that courtroom.”

It was particularly jarring to Hanna and Riggs because other gay couples in Texas, including friends of theirs, have successfully completed this process. The couple’s lawyer has offered them several options on bringing the petition back, changing the paperwork and the process. But there’s no question that if their marriage was legally recognized they would not be having this problem at all.

“In order to grant a second-parent adoption [automatically under current law], it has to be between two married people,” Jason explained. “And so, considering we’re not legally married in the eyes of Texas, they don’t have to grant that second-parent adoption because they don’t recognize our marriage…It’s up to the judge’s discretion on whether or not to grant it.”

Hanna and Riggs worry, as they wait for the next step, because they’re in a scary legal limbo.

“Without [co-adoption], if something happened to either me or Joe we don’t have any legal recourse to keep the other’s biological child,” Hanna said. “The state could come in and separate these two brothers…We want to reiterate how important it is for a state to recognize each family, whether it’s same-sex or opposite-sex, and really to ensure everyone has equal protection from the state.”