Here’s a legal riddle: How can two twins, born four minutes apart, be citizens of different countries? Not because they were born in different countries or to different mothers. And not through any “separated at birth” shenanigans. No, it was because the U.S. State Department determined they had slightly different DNA — one twin from a father who was a U.S. citizen, and the other from a father who was not.

But a federal judge has ruled that genetic material is not the determining factor in citizenship, meaning both twins are now U.S. citizens.

Fathers and Sons

Andrew Dvash-Banks is a U.S. citizen; his husband Elad is Israeli. The couple used a surrogate to have twins, fertilizing one egg with genetic material from each. According to their complaint filed in a federal court in California last year:

Both Ethan and Aiden were conceived and born during Andrew’s marriage to Elad. Andrew and Elad conceived the twins using their own sperm and eggs from the same anonymous donor. They used Elad’s sperm to conceive Ethan and Andrew’s sperm to conceive Aiden. A surrogate carried the twins to term together in her womb and gave birth to them moments apart on September 16, 2016, in Canada. Andrew and Elad are the only parents Ethan and Aiden have, and the only people Canadian law recognizes as Ethan and Aiden’s parents. Accordingly, Andrew and Elad have been the twins’ legal parents from the day they came into this world together.

But, for citizenship purposes, the twins weren’t treated the same. According to the Immigration and Nationality Act, children born to U.S.-citizen parents (even abroad) are automatically granted American citizenship. But State Department officials at the U.S. Consulate in Toronto wanted specifics. “She started off with, ‘Obviously the two of you had to use assisted reproduction in order to have your family,'” Andrew said, relating the story to NPR last year. “‘Tell me more about that. Tell me about who is genetically related to who.'” Ultimately, Aiden was granted a U.S. passport and Ethan was not.

Parents and Citizens

But a federal judge in California has ruled that inquiry was irrelevant. U.S. District Judge John F. Walter ruled that there is no language in the Immigration and Nationality Act “requiring a ‘blood relationship between the person and the father’ in order for citizenship to be acquired at birth.” Because Andrew and Elad were legally married at the time the twins were born, the law “does not require a person born during their parents’ marriage to demonstrate a biological relationship with both of their married parents.”

“This two-year nightmare is finally coming to a close,” Andrew told reporters last week. “Ethan has been recognized, as it should have always been, as a citizen at birth just like his twin brother.” Aaron Morris, the executive director of Immigration Equality and the family’s lawyer for the family, however, warned the same could happen to other families. “The State Department’s policies still exist,” Morris told NPR, and “it is likely that until they either dismantle it, change it or are ordered by a court to stop implementing the policy, that this will happen again to another couple.”

If you have immigration questions or have been denied citizenship, talk to an experienced immigration attorney.

Related Resources: