Washington (CNN) -- The Supreme Court struggled Wednesday to find a constitutional balance between free speech and privacy in a case involving provocative anti-homosexual protests by a small church at the funeral of a soldier who died in Iraq.
Members of the Kansas-based Westboro Baptist Church protested outside the court, while inside one of their members argued they have the right to promote what they call a broad-based message on public matters such as wars.
But the lawyer for the fallen Marine's father argued those protests are an invasion of privacy and an intentional infliction of emotional distress.
"[Justice] Brandeis said the right to be let alone was the most important, and so he must have been thinking there could be a tort [lawsuit] there for interference with privacy," said Justice Stephen Breyer, speaking for many of his colleagues. "And emotional injury, deliberately inflicted, could be one. ... But I see that in some instances that could be abused to prevent somebody from getting out a public message, and therefore, I'm looking for a line."
At issue is a delicate test between the privacy rights of grieving families and the free speech rights of demonstrators, however disturbing and provocative their message. Several states have attempted to impose specific limits on when and where the church members can protest.
The church, led by pastor Fred Phelps, believes God is punishing the United States for "the sin of homosexuality" through events including soldiers' deaths. Members have traveled the country shouting at grieving families at funerals and displaying such signs as "Thank God for dead soldiers," "God blew up the troops" and "AIDS cures fags."
Westboro members had appeared outside the 2006 funeral for Lance Cpl. Matthew Snyder in Westminster, Maryland, outside Baltimore.
Snyder's family sued the church in 2007, alleging invasion of privacy, intentional infliction of emotional distress and civil conspiracy. A jury awarded the family $2.9 million in compensatory damages plus $8 million in punitive damages, which were later reduced to $5 million.
The church appealed the case in 2008 to the 4th District, which reversed the judgments a year later, siding with the church's allegations that its First Amendment rights were violated.
Albert Snyder, Matthew's father, said his son was not gay and the protesters should not have been at the funeral.
"I was just shocked that any individual could do this to another human being," Snyder told CNN. "I mean, it was inhuman."
Church members say their broader message was aimed at the unspecified actions of the military and those who serve in it. They believe U.S. soldiers deserve to die because they fight for a country that tolerates homosexuality.
During Wednesday's intense one-hour arguments, the attorney for the Snyder side -- Sean Summers -- told the court the pain Albert Snyder suffered occurred before, during and after the funeral. That included a posting on the Westboro website that offered what Summers said were more intense personal attacks on the Snyders than may have occurred at the burial service.
"But it does not intrude upon the funeral," said Justice Antonin Scalia. "He doesn't have to watch them. They are just posted on the Internet."
"Why does he have a claim?" asked Justice Ruth Bader Ginsburg. The protest "was at considerable distance. There was no importuning anyone going to the funeral. It stopped before the funeral -- the service -- began."
She added that the Westboro members stayed on public rights-of-way, had the permission of police to gather, and were not arrested. Summers, however, reiterated the church crossed the line.
"I believe that the justices heard that and I hope that they realize that this isn't just a case about speech, it's about harassment, targeted harassment at a private person's funeral," Summers said afterward.
In an unususal twist, the attorney representing the church before the Supreme Court is also a church member -- Margie Phelps, a daughter of the pastor. She held her own under sometimes withering questioning from several justices, especially over whether the church's "speech" is personal or public in nature.
"Suppose someone believes that African-Americans are inherently inferior, and they are really a bad influence on this country," Justice Samuel Alito said. "And so a person comes up to an African-American and starts berating that person with racial hatred. Now is this just any old old African-American on the street? That's a matter of public concern?"
Chief Justice John Roberts said, "Does it make a difference, which seems to me to be the case here, that Mr. Snyder was selected not because of who he was, but because it was a way to get maximum publicity for your client's particular message?"
Margie Phelps countered her fellow congregants did not stalk or confront Snyder or his family.
"The words that were at issue in this case were people from a church delivering a religious viewpoint," she said, "commenting not only on the broader public issues that the discussion was under way in this nation about dying soldiers, about the morals of the nation."
Ginsburg jumped in, noting Westboro had picketed the Maryland state Capitol the same day, just before going to the Snyder funeral.
"This is a case about exploiting a private family's grief," she said, "and the question is: Why should the First Amendment tolerate exploiting this Marine's family when you have so many other forums for getting across your message," such as standing in front of the Supreme Court.
About a dozen congregants, including a couple of young children, did just that Wednesday, gathering in front of the court building to hold signs, sing hymns, and shout their message. They planned later to promote their message at nearby Arlington National Cemetery. They had been at the White House and other sites the day before.
The Supreme Court has never addressed the specific issues of laws designed to protect the "sanctity and dignity of memorial and funeral services," as well as the privacy of family and friends of the deceased. But the high court has recognized the state's interest in protecting people from unwanted protests or communications while in their homes.
The justices are being asked to address how far states and private entities like cemeteries and churches can go to justify picket-free zones and the use of "floating buffers" to silence or restrict the speech or movements of demonstrators exercising their constitutional rights in a funeral setting.
A majority of states across the nation have responded to the protests with varying levels of control over the Westboro church protesters. In Wednesday's case, 48 states and dozens of members of Congress filed an amicus brief in support of the Snyders.
Church members told the court they have a duty to protest and picket at certain events, including funerals, to promote their religious message: "That God's promise of love and heaven for those who obey him in this life is counterbalanced by God's wrath and hell for those who do not obey him."
The congregation is made up mostly of Fred Phelps and his family. The pastor has 13 children, and at least 54 grandchildren and seven great-grandchildren.
He described himself as an "old-time" gospel preacher in a CNN interview in 2006, saying, "You can't preach the Bible without preaching the hatred of God."
Church members have participated in several hundred protests across the country.
Last year, the high court blocked Missouri's effort to enforce a specific law aimed at the Westboro church. Phelps, daughter Shirley Phelps-Roper and other church members had protested near the August 2005 funeral of a soldier in St. Joseph, Missouri. State lawmakers later passed the "Spc. Edward Lee Myers Law," criminalizing picketing "in front of or about" a funeral location or procession.
The case heard Wednesday is Snyder v. Phelps (09-751). A ruling is expected in the next few months.
CNN's Kamal Wallace and Emanuella Grinberg contributed to this report.