The state’s highest court has thrown out the life without parole sentence of a man who was 16 when he fatally shot a 14-year-old in 2004 on Hazelwood Street in Boston’s Roxbury section.

Charon Ray killed Dakeem Galloway on June 10, 2004. Ray was convicted of first-degree murder in June 2007 and received the mandatory — at the time — sentence of life without parole.

The Supreme Judicial Court said Ray should be resentenced because of the court’s recent decision that it’s unconstitutional under both the US Constitution and the Massachusetts Declaration of Rights to sentence juveniles in Massachusetts to life without parole.

Advertisement - Continue Reading Below

The court rejected a number of other arguments brought by Ray in his appeal.

“We therefore decline to vacate the defendant’s convictions but remand this case to the Superior Court for resentencing,” the unanimous court said in today’s decision, which was written by Justice Robert Cordy.

Suffolk County prosecutors said they would fight to make sure Ray stayed in prison.

“This defendant stalked and murdered a 14-year-old boy who went out of his way to avoid a conflict. The defendant’s fellow gang members tried to thwart the investigation and these proceedings. Despite the intrusion of gang activity into the courtroom, he got a full, fair trial and a conviction based on the evidence. That’s much more than he gave Dakeem Galloway before taking the boy’s life. This defendant was sentenced to life in prison for the premeditated murder of an innocent child. Based on the facts of this case, we expect to argue that he deserves every day of that sentence,” District Attorney Daniel F. Conley said in a statement.

Attorney Robert F. Shaw Jr., Ray’s attorney, said Ray’s convictions should have been thrown out.

“We respect the Supreme Judicial Court and we vigorously disagree with this decision. The judgments in this case should have been reversed. As for the District Attorney’s public declarations of gang involvement, they are completely unfounded and contradict what prosecutors have represented in court for nearly a decade,” Shaw said in a statement.

Shaw, on the other hand, said he was pleased that “the blind, automatic sentence of life without parole no longer has force and effect in Mr. Ray’s case.”

After the SJC decision striking down life without parole sentences for juveniles was announced in December, lawyers told the Globe that such prisoners would have to have served at least 15 years before being considered for parole.

Lawmakers and prosecutors are pressing legislation on Beacon Hill that would amend the law to require juvenile murderers to have served at least 35 years before parole eligiblity.

For adults, life without parole remains the mandatory sentence for first-degree murder.