The US Supreme Court held in a 7-2 decision on Friday that undocumented immigrants must know both that they are in the country illegally and that they belong to a class that is proscribed from possessing firearms to be prosecuted under federal law.

The petitioner, Hamid Mohamed Ahmed Ali Rehaif, whose F-1 student visa had expired after he was dismissed from Florida Institute of Technology for being academically ineligible, stayed in the country, rented a gun and purchased ammunition at a gun range. He was arrested after the FBI, responding to a tip, came to his hotel room and discovered the ammunition and was told by the petitioner that he indeed had fired a gun. A federal grand jury subsequently charged him under 18 USC §922(g), which prohibits a person who “is illegally or unlawfully in the United States” from possessing “any firearm or ammunition.” He was convicted by a jury in the US District Court for the Middle District of Florida and the Eleventh Circuit affirmed.

The majority opinion penned by Justice Breyer overturned the lower court, holding that Rehaif did not knowingly commit a crime when he participated in shooting activities at a gun range. The court explained that,

In a prosecution under §922(g) and §924(a)(2), the Government must prove both that the defendant knew he possessed a firearm and that he knew he belonged to the relevant category of persons barred from possessing a firearm.

The court additionally stated that there was “a longstanding presumption that Congress intends to require a defendant to possess a culpable mental state regarding “each of the statutory elements that criminalize otherwise innocent conduct,” and that “There is no convincing reason to depart from this presumption here.”

Justices Alito and Thomas in their dissent stated,

So today’s decision is no minor matter. And §922(g) is no minor provision. It probably does more to combat gun violence than any other federal law. It prohibits the possession of firearms by, among others, convicted felons, mentally ill persons found by a court to present a danger to the community, stalkers, harassers, perpetrators of domestic violence, and illegal aliens. Today’s decision will make it significantly harder to convict persons falling into some of these categories, and the decision will create a mountain of problems with respect to the thousands of prisoners currently serving terms for §922(g) convictions.

Justices Alito and Thomas acknowledge a student may not know that he was dismissed from school, but ask “Does that take him outside §922(g)(8)? Is it likely that this is what Congress wanted? That is most doubtful,” they argue.