The justices were unanimous in ruling that extending a buffer zone 35 feet from clinic entrances violates the First Amendment rights of protesters.

Chief Justice John Roberts said authorities have less intrusive ways to deal with problems outside the clinics.

While the court was unanimous in the outcome, Roberts joined with the four liberal justices to strike down the buffer zone on narrow grounds. In a separate opinion, Justice Antonin Scalia criticized Roberts’ opinion for carrying forward “this court’s practice of giving abortion-rights advocates a pass when it comes to suppressing the free-speech rights of their opponents.”

The case began when Boston-area grandmother Eleanor McCullen and other abortion opponents sued over the limits on their activities at Planned Parenthood health centers in Boston, Springfield and Worcester. At the latter two sites, the protesters say they have little chance of reaching patients arriving by car because they must stay 35 feet from the entrance to those buildings’ parking lots.

The organization said that the buffer zone has significantly reduced the harassment of patients and clinic employees. Before the 35-foot zone went into effect in 2007, protesters could stand next to the entrances and force patients to squeeze by, Planned Parenthood said.

Before 2007, a floating buffer zone kept protesters from approaching unwilling listeners any closer than 6 feet if they were within 18 feet of the clinic. The floating zone was modeled after a Colorado law that the Supreme Court upheld. That decision was not called into question in Thursday’s ruling.

Clinic officials said they are most concerned about safety because of past incidents of violence. In 1994, a gunman killed two receptionists and wounded five employees and volunteers at a Planned Parenthood facility and another abortion clinic in nearby Brookline. The most recent killing was in 2009, when Dr. George Tiller, who performed abortions, was shot in a church in Wichita, Kan.

Abortion protesters said that other state and federal laws already protect health center workers and patients, as well as access to clinics.