Supreme Court justices on Wednesday aggressively questioned whether a Massachusetts law that creates buffer zones around abortion clinics unconstitutionally inhibits the free-speech rights of antiabortion activists.

Several justices made clear in their questioning that they think the law’s restrictions on who can come within a 35-foot space around a facility’s entrance unfairly target those who want to hand out leaflets or speak to the women planning abortions.

But predicting outcomes is difficult because the justice who probably is key to the court’s ultimate decision kept his own counsel. Chief Justice John G. Roberts Jr., normally an active participant in the court’s major cases, did not pose a single question to the three lawyers who argued the case.

The challenge to the Massachusetts law was brought by activist Eleanor McCullen, 77, and others who say they use quiet conversation and offers of help to try to persuade women not to have the procedure. Because of the law, they must stay behind painted lines on the sidewalk that they say hinder their chances of persuasive conversation.

The First Amendment doesn’t allow “dragging Mrs. McCullen off to prison because she has a consensual conversation 25 feet away from the doorway,” said her attorney, Mark L. Rienzi, an associate law professor at Catholic University.

But Justice Ruth Bader Ginsburg told Rienzi that the state enacted the restrictions in 2007 because “there was a considerable history of disturbances and blocking the entrance.”

The state “doesn’t know in advance who are the well-behaved people and who are the people who won’t behave well . . . and after the disturbance occurs, it’s too late,” she said.

Justice Stephen G. Breyer encouraged Massachusetts Assistant Attorney General Jennifer Grace Miller to tell the court that the state concluded that its less-restrictive prohibitions around abortion clinics had not controlled the problem of congestion and obstruction at facility entrances.

“There were hearings,” Breyer said. “Did the evidence show that what was involved was calm conversations between one person trying to counsel another or did the evidence show something else?”

“Certainly, the evidence showed something else,” she replied.

Justice Sonia Sotomayor noted that when the court in 2011 upheld the right of members of Westboro Baptist Church in Topeka, Kan., to bring even outrageous protests to the funeral of a military veteran, the court noted that the protesters could be kept away from the front of the church.

Deputy Solicitor General Ian H. Gershengorn, who argued for the Obama administration in support of Massachusetts, picked up on that point to say that the restrictions are no different from others that bar protesters from funerals, political conventions or even circuses, where animal rights activists might want to protest.

Those supporting the law spent much time defending it from hostile questioning.

Justice Antonin Scalia even said the lawyers were distorting the debate by how they referred to McCullen and the other plaintiffs.

“I object to you calling these people protesters,” Scalia told Miller, the Massachusetts assistant attorney general.

He added: “If it was a protest, keeping them back 35 feet might not be so bad. They can scream and yell and hold up signs from 35 feet. But what they can’t do is try to talk the woman out of the abortion. It’s a counseling case, not a — not a protest case.”

Under questioning from Justice Anthony M. Kennedy, Miller said there was no constitutional guarantee, “as a doctrinal matter, to close, quiet conversations.”

Kennedy replied, “Do you want me to write an opinion and say there’s no free speech right to quietly converse on an issue of public importance?”

Justice Samuel A. Alito Jr. said he was concerned about a part of the law that allows clinic employees to accompany women through the buffer zone to the facilities, and whether their speech was protected while McCullen’s was not.

Imagine, he said, a woman being approached by two people. “The first, who is an employee of the facility, says, ‘Good morning. This is a safe facility.’ The other one who’s not an employee says, ‘Good morning, this is not a safe facility.’ ”

Alito continued, “Now, under this statute, the first one has not committed a crime; the second one has committed a crime.”

Miller said that under the state’s interpretation of the law, clinic employees are not supposed to express views, and that they are allowed in the buffer zone only to do their jobs and maintain order.

“You judge it on what she’s doing, not what she’s saying,” Miller said.

Justice Elena Kagan suggested that the emphasis her colleagues were placing on the activity and motivation of those challenging the law was problematic.

“If you tried to do a statute that distinguished between protesters and counselors,” she said, it would cause more problems for government trying to stay viewpoint-neutral.

But Kagan, who normally votes with the liberal justices, added: “Which is not to say that this statute doesn’t have its problems, in my view. . . . I’m a little bit hung up on why you need so much space.”

There was considerable debate on that. Kagan thought the buffer zone was about the size of the courtroom (actually, the courtroom is 82 feet by 91 feet). Sotomayor said it was about two car-lengths. Gershengorn compared it to “an NBA three-point zone.”

If the Massachusetts limit is in trouble, a bigger question would be whether the court is ready to reverse an earlier ruling that upheld an eight-foot no-contact zone in a 2000 abortion protest case from Colorado. The decision brought forceful dissents from Scalia, Kennedy and Justice Clarence Thomas, and complaints since from First Amendment activists.

The Massachusetts case is McCullen v. Coakley.