Gov. Deval Patrick signed into law on Wednesday a bill designed to keep the peace in front of abortion clinics. The new law replaces a statute passed in 2007 that was struck down in a unanimous ruling by the US Supreme Court.

The previous law created a 35-foot protest-free zone around clinics. The court held the zone violated the free speech rights of protesters. The new law, which takes effect immediately, focuses on a protester’s conduct, not the physical space around the clinics, according to Planned Parenthood League of Massachusetts CEO Marty Walz.

Protesters are barred from blocking entrances to abortion clinics, including driveways, and can’t act in a threatening way. If they do, police have authority to disperse protesters. After a written dispersal order, protesters will be unable to enter a clearly-marked, 25-foot zone around the clinic for eight hours.

Pro-life groups have already said they will fight the order in court, calling the law unconstitutional. On July 8, while the law was being drafted, Massachusetts Citizens for Life sent a letter to the Legislature, accusing Attorney General Martha Coakley and Patrick were asking lawmakers to “support new litigation that will in all likelihood lead to more litigation.”

In a message posted on its website, Massachusetts Citizens for Life president Anne Fox wrote that the new law has the “potential to be worse than the one that went down 9-0.”

Coakley said she isn’t concerned, and that the Supreme Court decision striking down the earlier law was the guide for drafting the law. She said she is confident the new law will stand up to constitutional challenges. The attorney general, who is running for governor, joined a press call with Walz and Planned Parenthood President Cecile Richards immediately after the bill signing. Coakley said she wants to balance access to healthcare with First Amendment rights, and believes the new law succeeds in protecting both.

According to Walz, the new law is a matter of public safety, not of free speech. She said that since the June 26 ruling, there were several incidents of harassment outside Planned Parenthood’s clinics, including an incident where a woman ran into the busy street of Commonwealth Avenue to get away from a male protester. She expressed a worry these incidents were driving women away from receiving healthcare.

“We’ve lived in this world before,” she said, “and we refuse to accept it.”

Police have been stationed outside clinics every Saturday, as well as several other days, since the ruling.

“Police have been present and active, in Boston in particular,” Walz said, although there have been no arrests.