The First Amendment protects a fringe church's anti-gay protests at military funerals, a nearly unanimous Supreme Court ruled Wednesday in a powerful opinion that spoke to the nation's tolerance for even hateful public speech.

The court's most liberal and most conservative justices joined in a decision likely to define the term. It writes a new chapter in the court's findings that freedom of speech is so central to the nation that it protects cruel and unpopular protests - even, in this case, at the moment of a family's most profound grief.

Chief Justice John G. Roberts Jr. wrote that Westboro Baptist Church's picketing at fallen soldiers' funerals "is certainly hurtful and its contribution to public discourse may be negligible." But he said the reaction may not be "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," Roberts said.

The court sided with a group on the outskirts of American life: a tiny family church in Topeka, Kan., that has drawn disdain across the nation for its protests of military funerals and its lewd signs proclaiming God's hatred. Its message is that military deaths - and virtually any natural disaster - are divine punishment for the country's tolerance of homosexuality.

At issue was the protest in 2006 at the funeral of 20-year-old Marine Lance Cpl. Matthew Snyder in Westminster, Md., who had been killed in Iraq - one of more than 600 funerals the group has picketed. His father, Albert, filed a lawsuit seeking damages, saying the group had turned the event into a "circus."

Margie Phelps, the daughter of Westboro's founder, the Rev. Fred W. Phelps, and a lawyer who argued the case before the court, called Wednesday's decision a providential ruling that was more than she had hoped for.

It could encourage the group to challenge some of the more than 40 state and federal laws that seek to protect funerals from disruption, she said in a telephone interview.

Asked whether the decision would change the church's tactics, Phelps said, "We're going to picket more."

The court's lone dissenter was Justice Samuel A. Alito Jr., who said the First Amendment does not convey the right to "brutalize" private individuals.

"Our profound national commitment to free and open debate is not a license for the vicious verbal assault that occurred in this case," he wrote.

Sean E. Summers, who represented Snyder, said his client was naturally disappointed and worried about other families who will be confronted by Westboro.