A Massachusetts judge has agreed to erase Aaron Hernandez's conviction in a 2013 murder because he died before his appeal could be heard.

Judge Susan Garsh ruled Tuesday that a legal doctrine that calls for vacating convictions when a defendant dies before an appeal can be heard was binding precedent. She said she was compelled to follow it.

The former tight end hanged himself in his prison cell April 19 while serving a life sentence in the killing of semi-professional football player Odin Lloyd.

His suicide came just five days after he was acquitted in a double murder in the South End in 2012.

Hernandez's appellate attorneys made their request under a long-standing legal principle holding that when defendants die before their direct appeal is decided, their convictions are vacated.

MORE: Third Hernandez suicide note addressed to inmate, lawyer says

But prosecutors disagreed and filed several documents to make that case. One of the documents was the suicide note Hernandez left to his fiancee, Shayanna Jenkins-Hernandez. In it, he told her, "you're rich."

Patrick Bomberg argued Hernandez "should not be able to accomplish in death what he could not accomplish in life."

According to a document from the Department of Corrections, Hernandez heard a rumor that if an inmate with an open appeal died in prison, he would be acquitted of the charge and found not guilty.

In their motion asking the court to deny the request to vacate Hernandez's sentence, prosecutors said Hernandez has a negligible chance at best winning an appeal, and he shouldn't be rewarded for his conscious, deliberate and voluntary act of taking his own life.

Now the families of Lloyd, Daniel de Abreau and Safiro Furtado have all filed wrongful death lawsuits against Hernandez.

The IRS has also filed a lien against Hernandez and his $1.3 million home.

MORE: Aaron Hernandez found hanged in cell

The Associated Press contributed to this report.

Who was Aaron Hernandez