The U.S. State Department on Tuesday reversed a Trump-era policy challenging the U.S. citizenship of married couples' children born outside the country.

“Children born abroad to parents, at least one of whom is a U.S. citizen and who are married to each other at the time of the birth, will be U.S. citizens from birth if they have a genetic or gestational tie to at least one of their parents and meet the INA (Immigration and Nationality Act)’s other requirements,” said State Department spokesperson Ned Price in a statement. “Previously, the department’s interpretation and application of the INA required that children born abroad have a genetic or gestational relationship to a U.S. citizen parent.”

“This updated interpretation and application of the INA takes into account the realities of modern families and advances in ART (assisted reproductive technology) from when the Act was enacted in 1952,” Price said.

At least three married gay couples sued the State Department after the government refused to recognize the citizenship of their children. The agency claimed that the children were “born out of wedlock” because they were not biologically related to both parents.

The Trump White House had defended the policy, saying in one case that it “pertained to surrogacy” and had “nothing to do with the sexual orientation of the parents.”

Lambda Legal, which represented two of the couples in their lawsuits, applauded the new policy and called the old policy “unlawful and discriminatory.”

“Lambda Legal applauds the State Department’s decision in response to change its policy and start recognizing the U.S. citizenship of children of married same-sex couples born abroad,” Omar Gonzalez-Pagan, senior counsel at Lambda Legal, said in a statement. “The prior policy was unlawful and discriminatory, as recognized by courts in multiple cases, including two cases we won just last year. We are pleased to see this resolution, as this welcome change respects the marriages and families of same-sex couples as is required by our laws and constitution.”

“No family should have to suffer the stress and fear of government-sanctioned discrimination. In these cases, the State Department denied children their rights simply for who their parents are, causing tremendous harm and anguish for parents having to worry about the status of their children and their ability to stay in the country, as well their ability to have the full benefits and responsibilities of citizenship. This policy was discriminatory and unconstitutional, and should have never existed.”

“We are extremely gratified by this decision, which is a victory for the LGBTQ families that came forward to advocate for the rights of their children,” he added.