WASHINGTON — The Supreme Court on Monday threw out the conviction of a Pennsylvania man prosecuted for making threats on Facebook, but dodged the free-speech issues that had made the case intriguing to First Amendment advocates.

Chief Justice John Roberts said it was not enough for prosecutors to show that the comments of Anthony Elonis about killing his ex-wife and harming others would make a reasonable person feel threatened. But the high court sent the case back to the lower court without clarifying exactly what the standard of proof should be.

The ruling was a narrow victory for civil liberties groups that had urged the court to make it tougher to convict people who make crude comments on social media that might be viewed as threatening.

Yet the high court declined to lay out broad constitutional protections for such comments. "It is not necessary to consider any First Amendment issues," Roberts wrote.

Elonis, of Freemansburg, in eastern Pennsylvania, was prosecuted under a law that makes it a crime to threaten another person after he posted Facebook rants in the form of rap lyrics about killing his estranged wife, harming law enforcement officials and shooting up a school.

One post about his wife said, "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 claimed the government had no right to prosecute him if he didn't actually intend his comments to be threatening to others. He argued that his musings were protected by the First Amendment.

But the government said it didn't matter what Elonis intended. It argued that if the comments provoked enough fear and anxiety to make a reasonable person feel threatened, that was enough to prosecute it as a crime.

Seven justices on the high court agreed that it was not necessary to reach First Amendment issues in reversing Elonis' conviction.

Roberts said the reasonable-person standard is "inconsistent with the conventional requirement for criminal conduct — awareness of some wrongdoing."

"Federal criminal liability generally does not turn solely on the results of an act without considering the defendant's mental state," Roberts said.

Justice Samuel Alito agreed with the outcome, but said he would have made clear that a person can violate the law if he disregards the risk that comments will be interpreted as a threat.

Justice Clarence Thomas dissented, saying he would have found Elonis' posts to be "true threats" under the objective standard accepted by the vast majority of appeals courts prior to Monday's ruling.

Facebook was not a party in the case.

Elonis had claimed his posts under the pseudonym "Tone Dougie" were a form of therapy that allowed him to cope with the breakup of his marriage and being fired from his job at an amusement park.

His lawyers said the comments were heavily influenced by rap star Eminem, who has also fantasized in songs about killing his ex-wife. Elonis' wife testified that the comments made her fear for her life and she persuaded a judge to issue a protective order.

After his wife obtained a protective order, Elonis wrote on Facebook: "Is it thick enough to stop a bullet?"

About a female FBI agent who visited Elonis at home to ask him about the postings, Elonis posted: "Little agent lady stood so close, took all the strength I had not to turn the bitch ghost. Pull my knife, flick my wrist and slit her throat."

Those and other comments led to his arrest. A jury found Elonis guilty under a law barring interstate communications that contain "any threat to injure the person of another." He was sentenced to nearly four years in federal prison and released last year.

Elonis was arrested again in April for allegedly throwing a pot that hit his girlfriend's mother in the head. Police charged him with simple assault and harassment.

Steven Shapiro, national legal director of the American Civil Liberties Union, said the decision "recognizes that the law has for centuries required the government to prove criminal intent before putting someone in jail."

"While today's decision insists on fairness, it is not a license to threaten, which remains illegal when properly proved," Shapiro said.

While the ruling was seen as a minor victory for First Amendment advocates, University of Maryland law professor James Grimmelmann said it was also "not much of a loss for people concerned about harassment and domestic violence."

Elonis' attorney, John Elwood, said he is confident Elonis will be vindicated when lower courts reconsider his case.

"We're pleased that the Supreme Court saw the case for what it was: A criminal conviction for a "crime" of speech based on only a showing of negligence," Elwood said.

The Justice Department says 63 people were indicted on federal charges of making illegal threats in the 2013 fiscal year, up from 53 cases the previous year.