Editor's note: Jeffrey Toobin is a senior legal analyst for CNN and a staff writer at The New Yorker magazine, where he covers legal affairs.

(CNN) -- The Supreme Court ruled that a Kansas church whose members travel the country to protest at military funerals, holding signs that say "Thank God for dead soldiers" and "God blew up the troops," has a right to continue such demonstrations.

The case was brought by Albert Snyder, whose 20-year-old son, Marine Lance Cpl. Matthew Snyder, was killed in Iraq in 2006. The family-dominated Westboro Baptist Church, run by Fred Phelps, protested at Matthew Snyder's funeral to spread their opinion that American deaths in Afghanistan and Iraq are God's punishment for U.S. immorality and tolerance of homosexuality and abortion.

CNN.com talked to CNN senior legal analyst Jeffrey Toobin about Snyder v. Phelps, which pitted the right of families to grieve in privacy against the First Amendment right to free expression.

CNN.com: What do you make of the Supreme Court ruling?

Jeffrey Toobin: This is a very painful, difficult legal case, but the fact that it's an 8-to-1 Supreme Court ruling illustrates that the result was not particularly controversial, when you consider the protest did not disrupt the funeral at all.

That the protests couldn't be heard or seen from the funeral was important -- the First Amendment allows what's known as "time, place and manner." You can't exercise your First Amendment right by using a bullhorn in a residential neighborhood at 3 in the morning, but free expression has to be allowed in public spaces with impunity if it does not disrupt the community.

CNN: Is it a consideration that the protests harassed the mourners or disrupted the funeral?

Toobin: That's not what happened here. This was a considerable distance away.

What's interesting is only the press coverage hurt people. According to the testimony of the family, they saw the protest as they were driving by. Only after they saw the press coverage did they realize how ugly the protests were.

Unfortunately, this is one of the issues we've struggled with at CNN, how to cover these stories. We are in the news business, for better or for worse, we are human beings who don't want to compound the suffering of other people. But we have the obligation to cover the news.

CNN.com: We often hear of hate groups that get First Amendment protection.

Toobin: Yes, it's painful and your heart goes out to the family -- but the First Amendment is often called freedom for the thought that we hate.

This is similar to protection of Nazi groups. If you look at the history of the First Amendment, the cases that test the limits of freedom of speech almost always involve unpopular political groups, or those outside mainstream expression. Democrats and Republicans don't really need the First Amendment.

I think that this is the only decision the court could have made.

CNN.com: Is there anywhere else this can go? Can states challenge this?

Toobin: No, this is the end of it. By the way, to call this group a church is really an insult to religions everywhere. It's the Phelps family. To their credit, a member of the Phelps family, [Fred's daughter Margie Phelps], was the lawyer who argued the case for them to demonstrate. And you know, she did a very good job.