Cities and towns cannot ban sex offenders from living near parks and schools, the state’s high court said Friday, in a sharply worded ruling that could invalidate local laws in 49 municipalities from Springfield to Fall River.
The Supreme Judicial Court’s unanimous decision likened the restrictions to two dark chapters in American history: the forcible removal of Indian tribes in the 19th century and the internment of Japanese-Americans during World War II.
“Except for the incarceration of persons under the criminal law and the civil commitment of mentally ill or dangerous persons, the days are long since past when whole communities of persons, such as Native Americans and Japanese-Americans, may be lawfully banished from our midst,” Justice Geraldine S. Hines wrote.
Local officials who supported the restrictions decried the ruling and vowed to lobby Governor Charlie Baker and the state Legislature to pass statewide residency rules.
“It seems like the rights of children are taking a back seat to what is politically correct,” said Timothy Phelan, a former Lynn City Council president who sponsored the 2011 ordinance that the court struck down on Friday.
That law, with few exceptions, banned Level 2 and Level 3 sex offenders — those with a high or moderate risk of reoffending — from living within 1,000 feet of a school or park in Lynn. There are 2,643 Level 3 offenders and 6,115 Level 2 offenders in Massachusetts, according to state officials.
The court found Lynn’s restriction effectively banned those offenders from 95 percent of the city’s housing, forcing them into other cities and towns.
But Phelan said sex offenders, because their crimes do such extensive psychological damage, should lose certain rights and privileges. “To not recognize that issue is burying your head in the sand, and I think that’s what the SJC did,” he said.
Phelan also expressed shock that the court would compare historical atrocities against people based on their heritage with laws aimed at sex offenders convicted by courts and then classified by the state as dangerous.
“It’s just not an accurate, and not a fair, analogy,” Phelan said.
Despite the court’s forceful language, the decision was narrowly tailored. The justices found that Lynn’s ordinance was invalid because it went beyond the scope of a 1999 state law that overhauled the identification and monitoring of sex offenders and created the statewide sex offender registry.
By passing such a comprehensive law, state legislators made clear that they, not cities and towns, wanted “the first and final word on the subject of residency of sex offenders,” Hines wrote.
The court did not address the broader Constitutional questions raised by the American Civil Liberties Union, which brought the lawsuit and had argued that residency restrictions amount to cruel and unusual punishment and violate the fundamental rights of sex offenders to travel freely and live with their families.
Legal specialists said those questions would probably be tested if the Legislature adopted statewide rules or empowered cities and towns to impose their own restrictions. Baker’s office did not indicate Friday if he would support such a move.
“The administration shares municipalities’ concerns and the desire to protect children from sex offenders and will carefully review the public safety implications of this decision,” William Pitman, a Baker spokesman, said in a statement.
In recent years, state and local officials across the country have restricted where sex offenders can live, hoping to keep them away from children. The dominant view is that such rules, if applied statewide, are legal, said Daniel M. Filler, a Drexel University law professor. The problem, he said, has been with cities and towns passing a patchwork of local laws that simply force sex offenders to move to the next town.
“States have increasingly recognized that this is a problem that can only be solved at the state level because, if left to municipalities, it just becomes a game of one town after another putting up walls in their own jurisdiction,” Filler said.
In February, the New York State Court of Appeals threw out a Nassau County law that prevented sex offenders from living within 1,000 feet of a school, ruling that such local measures were preempted by a state law restricting residency for sex offenders.
In March, California’s Supreme Court struck down a portion of that state’s law that banned sex offenders from living within 2,000 feet of a school or park where children gather. The court found that such restrictions would have to be imposed on a case-by-case basis, not as a blanket policy.
“I do see this as a potential trend,” said Melissa Hamilton, a visiting criminal law scholar at the University of Houston Law Center. “Judges are standing back and saying, ‘We’re not going to be overruled by this holistic fear of sex offenders. We’re going to look into it, and be a little more balanced.’”
Opponents argue there is no evidence that residency restrictions protect children and say such rules may actually increase the chances of convicts offending again, by making it more difficult for them to find housing and jobs.
“These kinds of residency restrictions are, without doubt, based mostly on fear,” said John Reinstein, the former ACLU attorney who argued the Supreme Judicial Court case on behalf of a group of registered sex offenders.
Springfield’s mayor, Domenic J. Sarno, strongly disagreed. “This is a very disturbing and disheartening decision rendered by the courts,” he said. “The main thing here is the protection of our children from these predators.”Andy Rosen of the Globe staff contributed to this report. Michael Levenson can be reached at email@example.com. Follow him on Twitter @mlevenson.