The Department of State is appealing a California judge’s decision to grant U.S. citizenship to one of a same-sex couple's twin sons who lacked it.

The couple, Andrew and Elad Dvash-Banks of Los Angeles, were married in Canada in 2010. Their sons were born via surrogacy in Canada in 2016. Each boy was conceived using a donor egg and sperm from one of the two fathers.

When the couple tried to obtain U.S. citizenship for their sons, Ethan and Aidan, they were told they needed to submit to a DNA test to prove the children's paternity. When they finally received a response from the State Department, only Aidan received a passport, because his biological father is Andrew, who is an American citizen. The couple sued.

“The agency’s policy unconstitutionally disregards the dignity and sanctity of same-sex marriages by refusing to recognize the birthright citizenship of the children of married same-sex couples,” the initial Dvash-Banks lawsuit stated. “The State Department’s policy is arbitrary, capricious and serves no rational, legitimate, or substantial government interest.”

In February a judge ruled in their favor and ordered the State Department to issue a passport for Ethan, 2, whose biological father is Elad, who is an Israeli citizen. Now, the State Department is appealing that ruling.

“Once again, the State Department is refusing to recognize Andrew and Elad’s rights as a married couple," said Aaron Morris, executive director of Immigration Equality. "The government’s decision to try to strip Ethan of his citizenship is unconstitutional, discriminatory, and morally reprehensible."

Morris noted that this is settled law in the 9th Circuit Court of Appeals, which "has already established that citizenship may pass from a married parent to a child regardless of whether or not they have a biological relationship.”

Morris noted that the underlying constitutional principle at stake is: “Do you have the right to have your marriage recognized as a same-sex couple, just like all other couples?”

“That was a question answered by Windsor and Obergefell since 2015, that there is a constitutional right to marriage and to have that right recognized regardless of the gender of the person you marry,” Morris said.

Immigration Equality has represented the couple as their case winds through the court system. Morris said that the next step was for the 9th Circuit to hear oral arguments, but that, in the meantime, Ethan still has an American passport, because the Los Angeles judge ordered the government to give him one.

“Until and unless the 9th circuit overturns the decision, Ethan remains a U.S. citizen,” Morris said.

In an email, the State Department said it does not comment on pending litigation, but guidance on its website says “a child born abroad must be biologically related to a U.S. citizen parent” in order to acquire U.S. citizenship at birth.

FOLLOW NBC OUT ON TWITTER, FACEBOOK & INSTAGRAM