The state's highest court is throwing out the involuntary manslaughter conviction of a man who provided drugs in a fatal overdose.

Jesse Carrillo was convicted two years ago for the 2013 fatal heroin overdose of fellow UMass Amherst student Eric Sinacori, who was 20 when he died.

On Thursday, the state's Supreme Judicial Court vacated Carrillo's manslaughter conviction, arguing that the prosecution did not provide sufficient evidence that Carrillo knew the heroin would cause a fatal overdose.

Northwestern District Attorney David Sullivan said in a statement that it's "disheartening that the Supreme Judicial Court does not believe heroin use carries a high probability of substantial harm or death."

He added: "The families who have lost loved ones to this brutal epidemic would surely disagree with the Court’s analysis, as do we.”

But Northeastern University law professor Leo Beletsky says if the case were upheld, it would have set a dangerous precedent.

"If the government could charge every person who shares drugs with someone who subsequently dies, the way that the government had argued this case previously would essentially turn those friends, those partners, those co-users into potential murderers," he said.

Carrillo was also found guilty of heroin distribution. That conviction was upheld.

With reporting by WBUR's Quincy Walters