The bill passed the Senate unanimously on Thursday and the House in a 122-to-28 vote. Ten reproductive health clinics in the state offer abortions. The bill does not apply to hospitals.

Image Gov. Deval L. Patrick is expected to sign the legislation. Credit... Stew Milne/Associated Press

“The basic goal of the bill is to make sure patients and staff can enter reproductive health facilities without being obstructed, intimidated and harassed,” said Representative Carl M. Sciortino Jr., a Democrat who is one of the bill’s sponsors. “Current law is completely unenforceable and did not protect patients and staff the way it intended.”

Opponents of the new bill say it violates free speech rights.

“There’s no question there will be litigation,” said Marie Sturgis, the executive director of Massachusetts Citizens for Life. “This certainly clashes with First Amendment rights, and is something we should all be concerned about.”

The state’s Supreme Judicial Court upheld the constitutionality of buffer zones in 2001 after the current law was challenged.

Proponents say the zones are meant to protect patients and staff members from unwanted attention. “We’re trying to have a very small, but important, zone of safety for patients and staff who are entering these facilities,” said Kelly O’Bryan, the political director for Naral Pro-Choice Massachusetts. “We’re not trying to silence them at all.”