The Supreme Court, in an 8-1 decision, ruled Wednesday that members of the renegade Westboro Baptist Church have a constitutionally protected right to protest military funerals even though their demonstrations are widely despised and deplored.

The case presented the justices with a high-profile question about the breadth of First Amendment speech and assembly protections. A majority of justices ruled that these fundamental rights outweigh the concerns of grieving family members who would rather not deal with what they say are obnoxious protesters from the Kansas church.

"Speech is powerful. It can stir people to action, move them to tears of both joy and sorrow, and -- as it did here -- inflict great pain," Chief Justice John Roberts wrote in his majority opinion. "On the facts before us, we cannot react to that pain by punishing the speaker. As a nation we have chosen a different course -- to protect even hurtful speech on public issues to ensure that we do not stifle public debate."

Justice Samuel Alito was the only dissent, writing that the church protests simply go too far.

"Our profound national commitment to free and open debate is not a license for the vicious verbal assault that occurred in this case," Alito wrote. "In order to have a society in which public issues can be openly and vigorously debated, it is not necessary to allow the brutalization of innocent victims like petitioner. I therefore respectfully dissent."

The ruling upholds a lower-court decision to invalidate a $5 million judgment in favor of the father of a dead Marine whose funeral was targeted by the protesters.

For years, the Westboro protesters have popped up at places across the country to voice their displeasure with government policies they think promote homosexuality. They did so in 2006 at the funeral for Matthew Snyder, a Marine killed in Iraq.

Matthew Snyder was not gay and had no connection to the Westboro cause, but the funeral provided the protesters an opportunity to speak out against government policies.

Snyder's father, Albert Snyder, didn't want anything do with the picketers when he buried his son.

"I want them to stop doing this to our military men and women," Snyder told Fox News in October before the arguments. "I want the judges to hear that this case is not about free speech, it's about targeted harassment."

The ruling acknowledged Westboro's spurious choice of location for its protest. Nonetheless, Roberts concluded that "Westboro addressed matters of public import on public property, in a peaceful manner, in full compliance with the guidance of local officials."

In the days leading up to the funeral, Westboro parishioners, including Fred Phelps, notified local authorities of their intention to picket the service. They were kept 1,000 feet away from the church and because of the use of an alternative entrance for church-goers there was no disruption to the memorial.

Seven protestors held numerous signs including some that read, "Thank God for Dead Soldiers," "God Hates Fags," and "You're Going to Hell." There were no arrests.

Snyder filed a lawsuit against Phelps based on the protest and a subsequent post on the Westboro website about his son.

A jury awarded Snyder nearly $11 million in damages for the intentional infliction of emotional distress and invasion of privacy. That award was later cut in half and then the Fourth Circuit U.S. Court of Appeals set aside the decision in its entirety ruling that the protests were absolutely protected by the First Amendment.

Wednesday's ruling by the Supreme Court upholds the Fourth Circuit's decision but Roberts made clear on several occasions that his ruling is limited to the specific facts of this case. Roberts carefully noted that the ruling doesn't address the First Amendment viability of a Maryland law, passed after the Snyder funeral, banning all funeral protests.

A group of 21 news organizations joined a brief defending Westboro's case.

While calling their views "inexplicable and hateful," they expressed concern that a ruling against the church would chill the activities of anyone who wants to speak out on a controversial issue and "threatens to expand dramatically the risk of liability for news media coverage and commentary."

One of the media groups that joined the brief is Dow Jones whose parent company also owns Fox News.