WASHINGTON - The Supreme Court ruled Tuesday immigrants cannot be automatically deported if they are convicted of relatively minor crimes involving marijuana.

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 U.S. over possession of a small amount of marijuana. The court said Moncrieffe should have been able 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.

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.