CONCORD, N.H. — A law allowing abortion clinics to create buffer zones of up to 25 feet is different from a Massachusetts law that was struck down last month by the U.S. Supreme Court and will survive a court challenge, New Hampshire’s attorney general said in legal filings.

In response to a lawsuit, Attorney General Joseph Foster argued in motions filed this week that New Hampshire’s law, which took effect July 10, provides for a flexible zone of up to 25 feet, not the strict 35 feet in the Massachusetts law. He also says zones would vary by location and may not be used at all at clinics where no problems exist.

The lawsuit seeks a preliminary injunction to keep the law from taking effect while a judge decides its constitutionality.

“Up to 25 feet” is one key to the state’s argument. It says courts have ruled that a buffer zone of, for example, 4 feet does not violate the First Amendment right to free speech.

ADF will argue in court that the flexibility of zones doesn’t mean they’re constitutional. In fact, ADF said, by ceding the decision to create zones to a private entity, the state undermines its arguments.