WASHINGTON — The Supreme Court has been receptive in recent years to immigrants who are fighting deportation from the United States over minor drug crimes. On Wednesday, the justices entertained the least serious transgression yet — the case of a Tunisian man who was deported after he pleaded guilty in Kansas state court to possessing drug paraphernalia.

The item in question: A sock that contained four pills of the stimulant Adderall.

The justices sounded almost incredulous that the Obama administration deported the man, Moones Mellouli, over the conviction and that it was defending its actions in the Supreme Court.

Mellouli came to the United States in 2004 on a student visa and was living in the country legally when he was arrested for driving under the influence of alcohol and drugs. A jailhouse search turned up the pills in a sock.

He pleaded guilty to the paraphernalia charge, which did not specify kind of drug the sock held or how much.

"If it's not such a big deal that the state is willing to let him cop a plea to drug paraphernalia, why should that be the basis for deportation under federal law?" Chief Justice John Roberts asked Justice Department lawyer Rachel Kovner.

"Your Honor, we don't think that Congress viewed drug crimes that way," Kovner replied.

She faced similar comments over and over as she gamely sought to defend the administration's reading of the provision of federal immigration law that allows deportation for drug crimes.

"He was convicted of having a sock and you think that's more than tenuously related to these federal drugs," Justice Antonin Scalia said to Kovner, his former law clerk.

"We do, because he wasn't exactly convicted of having a sock. He was convicted of using an innocent item as a tool for the storage of drugs, and that's true of every drug paraphernalia conviction," Kovner said.

Justice Elena Kagan, who worked on a college campus as the Harvard Law School dean before she joined the administration in 2009, said it wasn't just the sock, but what it contained that seemed so trivial.

"He was convicted of paraphernalia here because he had four pills of Adderall, which if you go to half the colleges in America...and just randomly pick somebody, there would be a decent chance," Kagan said, leaving the thought incomplete. But she seemed to be suggesting that Adderall, prescribed to treat attention-deficit disorder, also is misused on college campuses to help students cram for and perform well on tests.

In 2013, the court ruled in favor of a Jamaican man who was deported over the possession of a small amount of marijuana.

A decision in Mellouli v. Holder, 13-1034, is expected by late June.