The last rites of a slain Marine clashed with a small church’s right to preach its anti-gay gospel in oral arguments heard before the U.S. Supreme Court on Oct. 6.

Despite religion’s prominent role in the dispute, however, the justices seemed most interested in, and perplexed by, the limits of another First Amendment right: free speech.

Westboro Baptist Church, an independent Baptist congregation with about 50 members based in Topeka, Kan., has picketed nearly 200 military funerals in recent years with signs like “Thank God for Dead Soldiers,” “You're Going to Hell” and “God Hates Fags”

Founded in 1955 by the Rev. Fred Phelps and composed mostly of his relatives, Westboro believes God is punishing America for its tolerance of homosexuality by killing U.S. soldiers in Iraq and Afghanistan.

In 2006, Albert Snyder filed a federal lawsuit against Westboro after church members picketed near his Marine son’s funeral in a Catholic church in Westminster, MD. Snyder argues the church infringed on his rights of privacy and religious expression, and intentionally inflicted emotional distress with nasty signs targeted at his son, Lance Cpl. Matthew Snyder.

In addition to the funeral protest, Westboro posted a poem on its website accusing Snyder and his ex-wife of raising their son “to defy his Creator, to divorce, and to commit adultery.”

A federal court partially sided with Snyder and awarded him $5 million in damages. An appeals court overturned that verdict, ruling for the church.

The justices on Wednesday seemed torn between sympathizing with Snyder's anguish and defending Westboro’s right to picket and preach, no matter how offensive its message.

Any ruling they deliver, the justices know, will have far-reaching implications for the First Amendment. The justices repeatedly raised hypothetical situations and pondered where to draw the lines between free speech and harassment, between offering opinions on public issues and targeting private citizens with invective.

Sean Summers, Snyder’s attorney, said “I would hope the First Amendment wasn’t enacted to allow people to disrupt and harass people at someone else’s private funeral.”

Summers painted Westboro as publicity hounds who sought to “hijack someone else’s private event” to promote their church and inflict harm on the Snyders.

But the justices questioned whether Westboro’s apocalyptic picket signs were targeted at the Snyder family or the country at large. “It sounds like `You,”' in signs like “You Are Going to Hell,” is directed at “the whole rotten society in their view,” said Justice Ruth Bader Ginsburg.

Westboro used many of the same signs to protest at the Maryland state capital the same day as the Snyder funeral, Ginsburg noted, meaning the church was likely targeting societal issues, not private families. Several justices alluded to the high court’s long history of protecting speech on matters of public concern.

But Ginsburg and other justices also appeared to empathize with the Snyder’s plight.

“This is a case about exploiting a private family’s grief,” she said. Ginsburg then asked Phelps’ daughter and church attorney, Margie Phelps, “Why should the First Amendment tolerate exploiting this Marine’s family when you have so many other forums for getting across your message?”

Margie Phelps said that Americans are questioning why U.S. soldiers are dying and that Westboro Baptist Church has answers people need to hear. “We have an answer to your question ... our answer is that you have to stop sinning if you want this trauma to stop happening.”

“Nation, hear this little church,” Phelps said. “If you want to stop dying, stop sinning. That’s the only purpose of this little church.”

Justice Sonia Sotomayor acknowledged that some of Westboro’s pickets, such as those condemning America or its wars, involve public speech and are thus likely protected by the First Amendment. “I fully accept you’re entitled in some circumstances to speak about any political issue you want,” Sotomayor said. “But what’s the line between doing that and then personalizing it and creating hardship for the individual?”

Phelps argued that Snyder became a public figure entangled with public issues when he spoke out against the war after his son’s death in 2006.

The justices largely ignored one of the key questions they had asked  lawyers from both sides to address: Does the First Amendment’s freedom of speech trump the First Amendment’s freedom of religion and peaceful assembly?

Legal experts say Snyder’s case is weak here, since the Constitution prohibits only government infringement on the free exercise of religion, not private acts like the church’s.

Justice Stephen Breyer said the Snyder case is not necessarily about the funeral, and seemed more troubled over the lack of legal guidelines about broadcasting “very obnoxious” personal attacks online.

“To what extent can they put that on the Internet?” Breyer asked, speaking of Westboro’s poem about Matthew Snyder. “I don’t know what the rules ought to be.”