Jeff Dion of the National Crime Victim Bar Association speaks with reporters after arguments in the case of Anthony Elonis, who was convicted in 2010 of threatening his wife via social media, at the Supreme Court building Dec. 1. (Jonathan Ernst/Reuters)

As the chief justice of the United States name-checked Eminem and speculated about ­rap-

obsessed teenagers, the Supreme Court struggled Monday with how to draw a digital-age distinction between illegal threats and violent speech that is nonetheless protected by the First Amendment.

The court’s first foray into examining speech made on social media featured rap lyrics and Facebook “likes” but relied on ancient legal concepts about intent and negligence.

The justices seemed reluctant to accept the government’s position that a threat exists whenever the speech in question would make a reasonable person fearful. But there did not seem to be a consensus on what more prosecutors should be required to prove.

The attorney for Anthony Douglas Elonis, a Pennsylvania man convicted of Facebook threats directed toward his estranged wife, a kindergarten class and an FBI agent, said his client should not have been convicted without prosecutors showing that he intended for his crude and violent Facebook posts be taken seriously.

That immediately troubled Justice Ruth Bader Ginsburg, at her customary spot on the bench five days after a heart stent procedure.

“How does one prove what’s in somebody else’s mind?” she asked. “This case, the standard was would a reasonable person think that the words would put someone in fear, and reasonable people can make that judgment. But how would the government prove whether this threat in the mind of the threatener was genuine?”

John P. Elwood, representing Elonis, said several states already require such proof, which he acknowledged made prosecution more difficult. In Elonis’s case, Elwood said, his client went out of his way to characterize his postings as “art” and fiction, and not to be taken seriously.

Justice Samuel A. Alito Jr. was not moved.

“This sounds like a road map for threatening a spouse and getting away with it,” Alito said. “So you put it in rhyme and you put some stuff about the Internet on it and you say, ‘I’m an aspiring rap artist.’ And so then you are free from prosecution.”

The court was considering a federal law that makes it a crime to communicate “any threat to injure the person of another.”

Prosecutors said there was no doubt Elonis was doing that on his Facebook feed during a two-month period in 2010. His wife had left with their two children, and Elonis, then 27 and working at an Allentown amusement park, grew increasingly despondent and angry.

He was fired and responded with a post about being a nuclear bomb about to explode. He pondered making a name for himself by shooting up an elementary school.

That brought a visit from an FBI agent, and the prolific Elonis later posted a fantasy about slitting her throat and turning her “ghost.”

About his estranged wife, Tara, he posted: “There’s one way to love you but a thousand ways to kill you. I’m not going to rest until your body is a mess, soaked in blood and dying from all the little cuts.”

Elonis was convicted after a judge told jurors that the government needed to prove only that Elonis made the statements and that a reasonable person would foresee that the words would be interpreted as “a serious expression of an intention to inflict bodily injury or take the life of an individual.”

Elonis served three years of a 44-month sentence before being released from prison.

The U.S. Court of Appeals for the 3rd Circuit upheld the conviction, saying Elonis’s subjective intent with his postings did not matter.

The current Supreme Court has been protective of First Amendment rights in certain contexts, as Justice Sonia Sotomayor pointed out.

“We’ve been loath to create more exceptions to the First Amendment,” she said.

But what the court in an early case called “true threats” have already been recognized as speech without First Amendment protection, and Justice Antonin Scalia indicated that not much had been lost.

He said the standard is that a threat “has to reasonably put somebody in fear. That’s all the government’s insisting on.”

Elwood said the expanded audience that can see a Facebook posting makes it more difficult to ascertain a speaker’s intent, and he worried about prosecutorial abuse.

“Many of the people who are being prosecuted now are teenagers who are essentially shooting off their mouths or making sort of ill-timed, sarcastic comments, which wind up getting them thrown in jail,” he said.

But Deputy Solicitor General Michael R. Dreeben said there is little evidence of that.

Jurors are able to put remarks into context, he said. They convict when they determine “that these statements are to be taken seriously, that they are not in jest, they are not exaggeration, they are not hyperbole, they are not artistic expression.”

Chief Justice John G. Roberts Jr. was skeptical of where the government would draw the line.

He asked about this statement made during a domestic dispute: “Da-da make a nice bed for mommy at the bottom of the lake” and “There goes Mama splashing in the water, no more fighting with dad.”

Dreeben, recognizing them as song lyrics, said they could not be prosecuted.

“Because Eminem said it instead of somebody else?” Roberts asked.

“Because Eminem said it at a concert where people are going to be entertained,” Dreeben replied.“This is a critical part of the context.

But several justices indicated that the government was asking for too much leeway.

Justice Elena Kagan described the government’s test as “you should have known you were going to cause fear, essentially,” she said.

“And that’s not the kind of standard that we typically use in the First Amendment.”

The case is Elonis v. U.S.