The U.S. Supreme Court handed a victory to anti-abortion activists on Thursday by making it harder for states to enact laws aimed at helping patients entering abortion clinics to avoid protesters, striking down a Massachusetts statute that had created a no-entry zone.

In a 9-0 vote, the court said the 2007 law violated freedom of speech rights under the U.S. Constitution's First Amendment by preventing anti-abortion activists from standing on the sidewalk and speaking to people entering the clinics. The law allowed only patients, staff, passersby and emergency services to enter the 35-foot (11-meter) zone.

The ruling casts into doubt similar fixed buffer zones adopted by several municipalities around the country, including San Francisco and Pittsburgh. The court did not specify under what circumstances other types of restrictions aimed at keeping public order outside clinics would be deemed lawful.