SAN FRANCISCO (AP) – State corrections officials cannot impose blanket lifetime restrictions on where sex offenders may live, the California Supreme Court ruled Monday in a case challenging a voter-approved measure that prohibits sex offenders from living within 2,000 feet of a school or park.

The court restricted its decision to San Diego County, where the case originated. But the ruling has potential statewide impact, with lawsuits in other counties likely, said Laurie Levenson, a criminal law professor at Loyola Law School.

“There’s every reason to believe in other large urban areas you’re going to find similar problems, which is that there is simply no place for these people to go,” Levenson said.

The court said the blanket restriction violates the constitutional rights of sex offenders in San Diego County by limiting their access to housing, increasing the incidence of homelessness and depriving them of access to services such as psychological counseling that are available to all parolees. It also made it more difficult for law enforcement officials to monitor sex offenders in the county, the court said.

“Blanket enforcement of the residency restrictions against these parolees has … infringed their liberty and privacy interests, however limited, while bearing no rational relationship to advancing the state’s legitimate goal of protecting children from sexual predators,” the court said in its unanimous decision.

The court did not strike down the law itself, saying sex offenders could still be forced to live more than 2,000 feet from schools and parks. But it said the decision would have to be made on a case-by-case basis.

Deborah Hoffman, a spokeswoman for the state Department of Corrections & Rehabilitation, said the agency was reviewing the decision.

The residency restrictions were part of Jessica’s Law, which was approved by California voters in 2006. Supporters say it keeps children safe from sexual predators. But opponents say it forces offenders onto the street or away from their families, creating hardships that make them more likely to reoffend.

Janice Bellucci, president of the group California Reform Sex Offender Laws, said the court should ban the residency restriction outright. “Part of the horror of this is it’s tearing families apart,” she said.

Retired California state Sen. George Runner, who authored Jessica’s Law, said the court’s decision put San Diego families at risk and set a “dangerous precedent” for the rest of the state. “Today’s California Supreme Court decision could allow a child molester to live across the street from a school or park where children gather,” Runner said in a statement.

The ruling, which upheld an appeals court decision, came in a case brought by four registered sex offenders in San Diego County.

A San Diego County judge ruled in 2011 that the law violated the three men and one woman’s right to intrastate travel, to establish a home and maintain their privacy and was not specifically tailored to each of their circumstances.

The lower court found sex offenders were effectively banned from about 97 percent of the multifamily rental housing units in San Diego County. At least some of the remaining housing was also not available to them for reasons including low vacancy rates, high prices and the unwillingness of some landlords to rent to sex offenders, according to the court.

The court ordered the state Department of Corrections to stop applying the residency restriction as a blanket provision against all paroled registered sex offenders who were under supervision in San Diego County.

A state appeals court upheld the decision, prompting the state Attorney General’s office to appeal to the State Supreme Court.

In a separate ruling on Monday, the California Supreme Court said the residency restrictions on sex offenders did not constitute punishment. The court upheld a law that allows judges to require convicts to register as sex offenders even if a jury has not convicted them of a sex-related crime.

Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

WATCH THE VIDEO REPORT