Now that Aaron Hernandez may have his conviction posthumously vacated — under an obscure Massachusetts legal doctrine — the Patriots could owe him money, a lawyer said Thursday.

The Pats may actually be contractually obligated to pay Hernandez’s estate a $3.5 million bonus that was stopped hours after his murder arrest in 2013, attorney William Kennedy told the CBS affiliate in Boston.

Kennedy represents the families of Safiro Furtado and Daniel de Abreu. Hernandez was acquitted in their shooting murders last week — only to commit suicide Wednesday in the Massachusetts prison cell where he was serving life without parole for another murder.

The Patriots may also owe Hernandez an additional $2.5 million in guaranteed base salary that was also halted after his 2013 arrest, lawyer Michael Coyne told CSNNE.com.

The Furtado-de Abreu wrongful death suit is one of three victim lawsuits still pending against the Hernandez estate; lawyers in the cases say they will continue seeking compensation despite the disgraced player’s suicide.

Sweetening that pot, legal experts believe Hernandez’s murder conviction — for the 2013 shooting death of his pal, semi-pro football player Odin Lloyd — will likely now be vacated under an archaic legal doctrine, memorialized in Massachusetts case law, called “abatement ab initio.”

Hernandez had been appealing the murder conviction at the time of his suicide. Since that appeal will now never be resolved, under “abatement” he would get a posthumous benefit of the doubt — meaning under the law, it would be as if he’d never been charged, tried or convicted.

A Patriots spokesperson told The Post that it was against team policy to discuss the financial details of player contracts.

It is unclear what the Hernandez estate is worth; four years ago, he signed a $40 million contract with the Patriots. He forfeited at least half of that when he was arrested for the Lloyd murder a year later, in 2013.

His sprawling, 5,600-square-foot mansion in the Boston suburb of North Attleborough was listed for sale a year ago at $1.5 million. But in a legal proceeding in 2015, a lawyer representing Hernandez in civil court claimed his client had run out of money, telling a judge, “There’s nothing left here as a practical matter.”

Hernandez is survived by his 4-year-old daughter, Avielle, and her mother, his former fiancee, Shayanna Jenkins.