WASHINGTON - In a case that could further define the limits of free speech online, the Supreme Court heard arguments Monday in the appeal by an Allentown man who claimed First Amendment protection following his arrest for threatening on Facebook to kill his wife and an FBI agent.

A U.S. District Court jury sitting in Philadelphia convicted Anthony Elonis in 2011 of violating a federal law barring threats over the Internet, mail, or telecommunications systems.

Elonis claimed that his posts were a means of self-expression and that he was entitled to the same license employed by rap musicians using violent images in their recordings.

Several justices expressed skepticism that his actions were shielded by the Constitution.

"This sounds like a road map for threatening a spouse and getting away with it," Justice Samuel A. Alito remarked in an exchange with Deputy U.S. Solicitor General Michael Dreeben, who urged the court to uphold Elonis' conviction.

Elonis was arrested in December 2010 after the security staff at Dorney Park & Wildwater Kingdom in Allentown, where Elonis had worked, alerted the FBI and local police to the posts.

Elonis, whose wife had earlier left with the couple's two children, was soon fired from his job. During the criminal trial, his wife testified that she was terrified by his posts, though he included disclaimers suggesting his words were not serious.

One post said:

"There's one way to love ya, but a thousand ways to kill ya,

"And I am not going to rest until your body is a mess,

"Soaked in blood and dying from all the little cuts."

In another, Elonis said he was contemplating attacking an elementary school:

"That's it, I've had about enough

"I'm checking out and making a name for myself. Enough elementary schools in a ten mile radius to initiate the most heinous school shooting ever imagined."

In a third, Elonis wrote that he contemplated slitting the throat of an FBI agent who had been monitoring his Facebook page and had come to his house to speak with him.

On Monday, government lawyers also came in for skeptical questioning from justices, who wondered whether giving prosecutors too free a hand would impose unconstitutional restrictions on free-speech rights. Elonis is being represented by Ronald Levine and Abraham Rein of the Center City firm Post & Schell, and John Elwood, a Washington-based appellate lawyer who made the oral arguments.

"People do say things in domestic disputes that they are sorry for later, and that they might not have known was a threat," Justice Stephen G. Breyer said.

Reading lyrics of the rap musician Eminem in which he wrote about killing his wife, Chief Justice John G. Roberts Jr. asked Dreeben whether Eminem should be arrested. Dreeben answered no, because the words were spoken at a concert and understood by the audience to be entertainment.

Although the subject was deeply serious, the hour-long session was occasionally punctuated by moments of levity.

Breyer, after interrupting Elwood to query him on the meaning of earlier judicial rulings, offered that "I wouldn't have asked if I didn't want your view."

To which Elwood responded, "And I am trying to give it to you," drawing laughter in the crowded courtroom.

Legal experts say Elonis v. United States is likely to be one of the more important cases to be heard by the Supreme Court this term because of its potential to resolve long-standing uncertainties about First Amendment law and language deemed threatening.

It has drawn interest from groups as varied as the American Civil Liberties Union, the Cato Institute, the Anti-Defamation League, rap-music scholars, and others who have filed amicus briefs.

The appeal hinges on the legal definition of what is known in the law as a "true threat." After Elonis' conviction, his Philadelphia lawyers, Levine and Rein, appealed to the U.S. Court of Appeals for the Third Circuit in Philadelphia, arguing that the trial jury should have been instructed by the judge to determine whether Elonis intended to threaten his wife and others. If there was no intent, he could not be prosecuted, they said.

But the Third Circuit court upheld the conviction, saying it was enough for the jury to find that the language was threatening if a "reasonable person" would see it that way.

The Supreme Court took up the issue decades ago in Watts v. United States. Robert Watts had announced at an antiwar rally that if he were drafted, he would shoot President Lyndon B. Johnson. He was found guilty of threatening the president's life, but the Supreme Court overturned the conviction, ruling that Watts had merely engaged in political hyperbole.

Since then, the Supreme Court has had relatively little to say on the issue.

In one notable exception, the 2003 case Virginia v. Black, the court overturned a state law making it illegal to threaten people with a burning cross. Under the law, juries could presume that the act of cross-burning itself was a threat.

But the court found there were potential uses of a burning cross, such as political rallies, that did not necessarily imply a threat. Prosecutors and juries must consider the circumstances, the court said.

Ambiguities in that ruling created uncertainty over the legal standards for proving a threat, setting up the case argued Monday.

Free Speech or Threats?

Anthony Elonis contended at his October 2011 criminal trial that rap lyrics he posted on Facebook were intended as a form of artistic expression and that he never meant to threaten anyone.

After he was fired from Dorney Park & Wildwater Kingdom in Allentown, Elonis posted this reference to the amusement park's forthcoming Halloween Haunt:

"Moles! Didn't I tell y'all I had several? Y'all sayin' I had access to keys for all the . . . gates. That I have sinister plans for all my friends and must have taken home a couple. Y'all think it is too dark and foggy to secure your facility from a man as mad as me? You see, even without a paycheck, I'm still the main attraction. Whoever thought the Halloween haunt could be so . . . scary?"

He added another post around the same time, directed at his then-estranged wife, Tara:

"There's one way to love ya, but a thousand ways to kill ya,

And I am not going to rest until your body is a mess,

Soaked in blood and dying from all the little cuts."

Another post directed at his estranged wife said:

"Fold up your PFA and put it in your pocket. Is it thick enough to stop a bullet?"

An FBI agent later visited Elonis at home to ask him about the postings, and afterward Elonis took to Facebook again:

"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."