In a 7-2 decision, the justices sided with Adrian Moncrieffe, a longtime resident of the United States from Jamaica who was deported from the United States over possession of a small amount of marijuana. The court said Moncrieffe should have had the opportunity to contest his deportation.

Justice Sonia Sotomayor said in her opinion for the court that marijuana offenses must involve either the sale of the drug or possession of more than a small amount to count as serious enough to warrant automatic deportation.

Justices Samuel Alito and Clarence Thomas dissented.

The decision means that Moncrieffe will be able to return to the United States so that he can make the case that he should be allowed to remain in the country where he has lived since the age of 3, said Thomas Goldstein, his Washington-based lawyer. Goldstein said he believes that the government often drops the deportation effort in minor cases like Moncrieffe's.

The case stems from Moncrieffe's 2008 arrest in Georgia. Police pulled him over and found 1.3 grams of marijuana in his car, the equivalent of two or three marijuana cigarettes, Sotomayor said. He faced the charge of possession of marijuana with an intent to distribute, which under Georgia law encompasses a range of conduct from social sharing to distribution of larger amounts.

Moncrieffe accepted a plea with no jail time in which the charge would be expunged if he complied with his probation. Two years later, immigration agents jailed him and began deportation proceedings, citing the marijuana arrest. For deportation purposes, it was as if Moncrieffe had been a major drug dealer.

In the government's eyes, Moncrieffe's crime was serious enough to count as an "aggravated felony" and that it fell into a category that made his deportation automatic and deprived even the attorney general of the ability to step in and cancel it.

But Sotomayor said that under immigration law, a conviction that "fails to establish that the offense involved either remuneration or more than a small amount of marijuana" is not an aggravated felony.

She also dismissed the concern raised by Alito in his dissent that, because about half the states have statutes similar to the one in Georgia, many people convicted of marijuana crimes will avoid deportation because the state laws are not specific enough.

"Escaping aggravated felony treatment does not mean escaping deportation," she said. It just means that the deportation is not automatic, Sotomayor said.

Thomas wrote that the Georgia law defines the crime as a drug trafficking offense, which should have resolved the case in the government's favor.