Justices side with Mexican immigrant in underage sex deportation case

FILE - In this June 30, 2014file , the Supreme Court building is seen in Washington. Conservatives who care about the court say they have no such worry this time around. They feel confident that whomever President Donald Trump nominates for the Supreme Court, they won’t be looking back with regret in the years to come. (AP Photo/Pablo Martinez Monsivais, File) (Copyright 2017 The Associated Press. All rights reserved.)

The U.S. Supreme Court sided Tuesday with a Mexican immigrant who faced deportation after he was convicted of having consensual sex with his girlfriend who was 16 at the time.

The justices ruled unanimously that while Juan Esquivel-Quintana committed a crime under California law, his conduct did not violate federal immigration law.

It's a crime in California to have sex with anyone under 18 if the age difference is more than three years. That applied to Esquivel-Quintana, who had sex with his 16-year-old girlfriend before and after his 21st birthday.

But Esquivel-Quintana argued that his conduct would have been legal under federal law and the laws of 43 other states that are less strict.  The government countered – and said the courts should defer to immigration officials in interpreting laws that are vague.

The case is the first one before the Supreme Court that names Attorney General Jess Sessions as a party – though the incident in question took place before Sessions was confirmed to his new post.

The Associated Press contributed to this report.