BOSTON (AP) — The highest court in Massachusetts ruled Wednesday that lifetime community parole for sex offenders is unconstitutional, finding that only judges can impose additional jail time on offenders who have completed their original sentence.

Currently, the state Parole Board can sentence sex offenders to additional terms of incarceration if they violate the terms of what’s called community parole supervision for life.

The Supreme Judicial Court said that the current law violates the state constitution because resentencing offenders is a job that rests squarely with the state’s judiciary, not the parole board, which is part of the executive branch of government. The law violates the separation of powers under the Constitution, the court said.

The court said that if the state Legislature wants to require a period of supervised release for sex offenders after they complete their sentences and to authorize additional prison time when an offender violates that supervised release, it can do so without violating the state constitution.

“Such legislation simply must require that a judge, rather than the parole board or another executive agency, determine whether a sex offender has violated a condition of supervised release, and whether a new or suspended term of imprisonment should be imposed,” Justice Ralph Gants wrote.

The SJC said that anyone who has been sentenced to lifetime community parole by the board must be resentenced by a judge. The court said resentencing the 275 to 300 people who fall into that category would be a “substantial, but manageable burden” on the court system.

House Minority Leader Brad Jones, R-North Reading, said his legal counsel is looking at drafting legislation to address the ruling.

“Anything that potentially removes a level of protection for the community concerns me,” Jones said. “I understand the technical point they’re raising, but they also laid out a path to solve it or address it. I’m certainly hopeful we can do something sooner rather than later.”

State Attorney General Martha Coakley said she is committed to acting quickly to update the law.

Jeffrey Harris, a Boston attorney who co-authored a friend-of-the-court brief in the case for the Massachusetts Association of Criminal Defense Lawyers, called the decision a “win for due process” in Massachusetts.

“The statute the court struck down today allowed the parole board to do something they should never have been allowed to do under our state constitution: sentence and incarcerate people with no judge, and no lawyer, and no due process,” Harris said. “The court today reaffirmed that the judge does the sentencing in our system, not the parole board.”