WASHINGTON (Reuters) - The U.S. Supreme Court on Monday struck down a gender distinction in U.S. immigration law that treats mothers and fathers differently when determining a child’s citizenship, calling such inequality “stunningly anachronistic.”

FILE PHOTO - The Supreme Court is seen in Washington, DC, U.S. April 7, 2017. REUTERS/Aaron P. Bernstein

The high court, in a 8-0 ruling authored by Justice Ruth Bader Ginsburg, found that a provision in federal law that defines how people born overseas can be eligible for U.S. citizenship violated the U.S. Constitution’s equal protection guarantee.

The ruling, however, may not help the man who brought the case, New York resident Luis Morales-Santana, who was seeking to avoid deportation to the Dominican Republic after being convicted of several offenses.

The law requires that unwed fathers who are American citizens spend at least five years living in the United States - a 2012 amendment reduced it from 10 years - before they can confer citizenship to a child born abroad, out of wedlock and to a partner who is not a U.S. citizen.

For unwed U.S. mothers in the same situation, the requirement was only one year.

In the ruling, the Supreme Court said that until Congress revises the law, both women and men will be covered by the five-year requirement.

Ginsburg, known for her work on gender equality before she became a jurist, wrote for the court that in light of the Supreme Court’s various rulings regarding the equal protection guarantee since 1971, having separate “duration-of-residence requirements for unwed mothers and fathers who have accepted parental responsibility is stunningly anachronistic.”

The arguments made in defense of the law by former President Barack Obama’s administration before he left office in January “cannot withstand inspection under a Constitution that requires the government to respect the equal dignity and stature of its male and female citizens,” Ginsburg wrote.

Morales-Santana’s deceased father was an American citizen, while his mother was not. His father failed to meet the law’s five-year requirements by 20 days.

His lawyer, Stephen Broome, said he is reviewing how the ruling affects his client.

Morales-Santana, 54, was born in the Dominican Republican and has lived legally in the United States since 1975. He was convicted of several criminal offenses in 1995, including two counts of robbery and four counts of attempted murder. The U.S. government has sought to deport him since 2000.

The high court split 4-4 on the same issue in 2011.

In July 2015, the 2nd U.S. Circuit Court of Appeals in New York sided with Morales-Santana and struck down the law at issue, saying it applied “impermissible stereotyping” in imposing a tougher burden on fathers. The U.S. Justice Department sought to defend the law and asked the high court to take the case.

The case is one of several with immigration-related themes that are before the justices at a time when President Donald Trump’s administration is pursing efforts to strengthen immigration enforcement.