A judge erased a 2013 murder conviction against former NFL star Aaron Hernandez, ruling that case law in Massachusetts has long established that defendants who die before their appeals are heard should have their convictions vacated.

Bristol County Superior Court Judge E. Susan Garsh said Tuesday she was compelled to follow precedent in ordering that Hernandez's first-degree murder conviction be dismissed in the death of semi-professional football player Odin Lloyd. Hernandez killed himself in prison last month while serving a life sentence.

Lloyd's mother fought back tears after the ruling Tuesday, saying the former New England Patriots tight end would always be guilty in the eyes of her family.

"In our book, he's guilty and he's going to always be guilty," Ursula Ward said of Hernandez. "But I know, I know one day I'm going to see my son, and that's the victory that I have and I am going to take with me. I am waiting for my master to say, 'Well done, my good and faithful servant, and welcome to the joys of my kingdom.' And that's when I'll see my baby again. ...

"I am not giving up. When [God] says the battle is over, the battle is over. So I'm holding on until He tells me to give up."

Bristol County District Attorney Thomas M. Quinn III said he plans to appeal the ruling and is willing to take the case all the way to the Massachusetts Supreme Court.

"Despite the tragic ending to Aaron Hernandez's life, he should not reap the legal benefits of an antiquated rule," Quinn said. "State and federal courts from across the country have rejected this antiquated rule. Massachusetts, in my opinion, needs to follow suit."

Lawyers for Hernandez had argued that the Supreme Judicial Court had applied the legal doctrine "without exception," even in cases of suicide. They said his conviction wasn't considered final because the automatic appeal he was entitled to had not been heard.

Prosecutor Patrick Bomberg said Hernandez's suicide was a "calculated act." He cited a report issued last week from the Department of Correction that said Hernandez told another inmate he had heard a "rumor" that if an inmate has an open appeal on his case and dies in prison, he will be acquitted.

Garsh said there may be "complex and myriad" reasons that Hernandez killed himself. She cited a report from prison officials that some inmates said they knew about a radio broadcast that speculated Hernandez may have been gay. She also said a "possible mental disturbance" was reflected in a suicide note to his fiancée in which he said his death was "the Supremes, the almightys plan, not mine."

Lloyd's mother has filed a wrongful-death lawsuit against Hernandez. Her attorney, Douglas Sheff, said he doesn't believe the civil case will be undermined by the dismissal of Hernandez's conviction.

An attorney in Hernandez's criminal case filed court papers last month that said his estate is currently worth "zero."

Sheff said the only identifiable assets he knows of are Hernandez's house, valued at $1.3 million, and a Hummer. But he noted that a message Hernandez left for his fiancée said, in part: "You're rich."

"We don't know what that refers to. We'd like to find out," he said.

Hernandez's appellate attorney, John Thompson, told reporters he believes it's still uncertain as to whether Hernandez took his own life. Thompson said he has recent correspondence from Hernandez in which he said he was interested in pursuing an appeal of his conviction.

Hernandez's lead attorney in his recent double murder trial, Jose Baez, has pledged to independently investigate the death.

State police said in an investigative report that Hernandez was found naked April 19 and hanging from a bed sheet tied around the window bars of his cell. Correction officers found that cardboard had been shoved into the tracks of Hernandez's cell door to prevent it from opening. Hernandez also had put shampoo on the floor to make it slippery, the report states.

An autopsy by the state medical examiner's office determined the cause of death was asphyxia by hanging and the manner of death was suicide.

His death came five days after he was acquitted in a 2012 double murder.

Hernandez, who grew up in Bristol, Connecticut, and played football at the University of Florida, was considered an up-and-coming star during his three seasons with the Patriots. He was cut from the team hours after his arrest in Lloyd's killing.

The practice of posthumously vacating convictions is hotly debated. Some states have doctrines similar to Massachusetts case law that say convictions are not final until the merits of a defendant's appeal have been decided. According to a 2013 Minnesota Supreme Court ruling, more than a dozen states allow appeals to go forward even after the defendant dies, and the conviction is vacated only if the appellate court finds that a new trial would have been warranted.

Federal courts have widely adopted the abatement principle.

The Associated Press contributed to this report.