The Supreme Court confronted a U.S. citizenship law with evident distaste Wednesday because it treats fathers and mothers differently, even as justices offered little hope to a Mexican-born man who says he should be declared an American.

If Ruben Flores-Villar's mother had grown up in the United States instead of his father, he'd almost certainly be a U.S. citizen under a 70-year-old law for children born abroad to one American parent and one non-American.

Flores-Villar's problem is that his father, not his mother, is a U.S. citizen. The law makes it harder for children of unwed American fathers to claim citizenship.

The justices heard arguments in Flores-Villar's appeal of his criminal conviction for violating immigration law. The 36-year-old was born in Mexico, but raised by his father and grandmother in San Diego. He was deported after U.S. authorities denied him U.S. citizenship and after he served a prison term on the immigration charges.

Chief Justice John Roberts and Justice Antonin Scalia seemed to sum up the court's dilemma when they agreed that even if the law is unfair, the only thing that could help Flores-Villar is if the court would, in effect, make him a citizen. "Never done," Scalia said.

The federal public defender representing Flores-Villar, Steven Hubacheck, said the law perpetuates outdated "gender stereotypes" about caring for children in a time when many more single fathers raise children.

Scalia questioned whether these notions were outdated. He asked if it wasn't generally true that with "an illegitimate child, it is much more likely that the woman will end up caring for it than that the father would?"

Justice Ruth Bader Ginsburg interjected that the court should be considering parents like Flores-Villar's father "who don't fit this mold."

The Obama administration urged the court to uphold the conviction. Congress took many factors into account in drafting the law, including the child's likely connection to the U.S. and the laws of other countries, Justice Department lawyer Edwin Kneedler said.

Neither side offered an estimate of how many people might be affected, although the Geneva-based American Citizens Abroad says more than 40,000 children a year are born outside the U.S. to an American parent.

Among the many wrinkles in the case is that Flores-Villar is claiming discrimination on behalf of his father.

For people born before 1986, their American fathers had to have lived in the U.S. for 10 years, at least five of them after the age of 14, in order for their citizenship to be passed on. Flores-Villar's father could not meet the second part of that requirement because he was only 16 when his son was born.

American mothers need only have lived in the U.S. continuously for a year before the birth of a child.

The 1986 changes to immigration law reduced the total residency requirement for fathers to five years, two of which after the age of 14.

By contrast, a child born in the United States is a U.S. citizen regardless of the parents' nationality, as is a child born abroad to two American citizens if one of them has ever lived in the United States.

Another oddity is that the law imposes the longer residency period on married couples when one spouse is not a citizen.

Three justices, Ginsburg, Stephen Breyer and Sonia Sotomayor, signaled they might be willing to take Flores-Villar's side. But there did not appear to be two more justices willing to go as far. Justice Elena Kagan was absent because of her work on the case during her time at the Justice Department.

The court also could find that the law discriminates against men, but this result would not help Flores-Villar if the justices say the longer residency requirement should apply to everyone.

Or the justices could decide that the case is so knotty that it was a mistake to take it up, and issue no ruling. Roberts and Scalia both suggested such a result.

A decision is expected by summer.

The case is Flores-Villar v. U.S., 09-5801.