A federal appeals court on Friday upheld a Nebraska law that prohibits picketing within 500 feet of funerals, saying it did not violate the free speech rights of the Westboro Baptist Church, whose members condemn homosexuality.

The 8th U.S. Circuit Court of Appeals ruled 3-0 that the law struck an appropriate balance between the rights of law-abiding people to speak, and the privacy right of mourners to grieve without intrusions.

Westboro members often protest at military funerals, and the Topeka, Kansas-based church has drawn attention for appearing at funerals of soldiers killed in Iraq and Afghanistan.

They believe that patriotic displays turn the funerals into "patriotic pep rallies," though the deaths are a result of God's wrath over the United States' tolerance of gays and lesbians.

"This changes nothing," Westboro lawyer Margie Phelps said in an interview. "We've got to be on your streets. We've got to warn you that your soldiers are dying for the nation's proud sins."

Nebraska Attorney General Doug Peterson welcomed the decision.

"This law strikes the appropriate balance between First Amendment free speech rights and the rights of grieving families to bury their loved ones in peace," he said in a statement.

The law had been challenged by Phelps' sister Shirley Phelps-Roper, a Westboro member involved in picketing the October 2011 funeral of Caleb Nelson, a 26-year-old Navy SEAL from Omaha.

The picketing included signs bearing such messages as "no peace for the wicked" and "thank God for dead soldiers."

Writing for the St. Paul, Minnesota-based appeals court, Circuit Judge Bobby Shepherd said Nebraska's law was narrowly tailored to serve the state's significant interest in protecting funeral attendees' peace and privacy.

He also said the law did not discriminate based on viewpoint, and that Westboro remained free to use the phone, mail, social media and other public property to express itself.

"WBC is not entitled to its own bubble-ensconced pedestal surrounded by chalk lines or yellow tape any more than those opposed to WBC messages are entitled to a heckler's veto," the judge wrote.

Friday's decision upheld a March 2016 ruling by Chief Judge Laurie Smith Camp of the federal court in Omaha.

The appeals court in 2012 upheld a similar ordinance from the city of Manchester, Missouri, involving a 300-foot buffer.

The case is Phelps-Roper v Ricketts et al, 8th U.S. Circuit Court of Appeals, No. 16-1902.

(Reporting by Jonathan Stempel in New York; Editing by Tom Brown)