Last summer, the State Department changed the rules of the Immigration and Nationality Act (INA) so that a child born outside of the U.S. to American parents must be biologically related to one of the parents in order to receive birthright U.S. citizenship.

As a result, children of same-sex couples who were born abroad are now being denied citizenship. The government policy effectively de-recognizes same-sex marriages in these situations, granting these children no automatic right to American birthright citizenship even though their parents are both U.S. citizens.

The State Department website reads: “Even if local law recognizes a surrogacy agreement and finds that U.S. parents are the legal parents of a child conceived and born abroad through ART, if the child does not have a biological connection to a U.S. citizen parent, the child will not be a U.S. citizen at birth.”

Even if there is a biological relationship, children are still being denied citizenship because the State Department views them as being born “out of wedlock.” Children born via gestational surgery and other forms of assisted reproductive technology (ART) are considered to be born out of wedlock even if their parents are legally married.

“This is a very clear attack on families, on American families,” Roee Kiviti, who was unable to get a U.S. passport for his daughter because he and his husband conceived her with the help of a gestational surrogate, tells The Daily Beast. “Denying American married couples their rights to pass their citizenship, that is flat-out discrimination, and everyone should be concerned about this.”

Children born out of wedlock face even higher legal hurdles to obtaining birthright citizenship: They must submit DNA tests to prove genetic links to U.S. citizen parents, their parents must testify that they can support their children financially and they must be able to prove that they’ve been in the U.S. for at least five years before the child was born.

Immigration Equality, a nonprofit that advocates for LGBTQ+ people in the immigration system, has taken the case of one couple, Allison and Stefania, to federal court. They have argued that the policy “hurts families and undermines the familial relationships of same-sex parents.” The nonprofit has had some success in arguing that children of same-sex parents born abroad are entitled to U.S. birthright citizenship. In the case surrounding Ethan Dvash-Banks, the two-year-old son of a gay couple, a federal judged ruled in February that “the basis for the State Department’s imposition of a biological requirement is its strained interpretation” of existing immigration law. Earlier this week, a federal judge recently denied the State Department’s motion to dismiss Allison and Stefania’s lawsuit.

“The judge’s decision to hear this case is an important step forward for the Zaccari-Blixt family and all families who are currently being denied equal treatment under the law,” says Aaron C. Morris, executive director of Immigration Equality and the couple’s attorney. “The government should change its policy, and we will keep fighting until they do.”

The ability to fight the policy is evidence that American citizenship has power and meaning, Allison explains. Many couples don’t have the same privilege.  “We are very lucky—we were able to live abroad to be together, we were able to have two amazing children, we have a great life here… and there are a lot of people in a lot worse situations than ours,” she tells Daily Beast. “And because of that, it also means that we are lucky enough to be in a position where we can fight it.”

Marriage equality has only existed at a federal level for less than five years and this policy is finding every way to de-legitimize same-sex marriage and parenthood. It endangers citizenship for many children of same-sex parents and puts them at risk of deportation or even statelessness.