Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The brain of former NFL star and convicted murderer Aaron Hernandez will be turned over to a university for study about possible brain trauma, authorities said Thursday, after an attorney for his family accused them of "illegally" withholding it.

The announcement that Hernandez’s brain will be released to researchers came after the chief state medical examiner in Massachusetts ruled Hernandez’s death early Wednesday a suicide.

"Now that the cause and manner of death have been determined, the brain will be released to Boston University’s Chronic Traumatic Encephalopathy Center as Mr. Hernandez’s family wishes," the statement from the district attorney's office and police said.

Hernandez, 27, a former Patriots tight end who was serving a life sentence for the 2013 murder of his friend, was found by correction officers hanging in his single cell, authorities said.

The state chief medical examiner said Hernandez's death was caused by asphyxia by hanging, the Worcester County district attorney’s office and state police said in a statement.

Hernandez family attorney Jose Baez said the family plans to donate the brain to advance the study of CTE, which is a degenerative brain disease that has been linked to athletes, including football players, who might suffer concussions and head trauma.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Doctors say those afflicted by it can suffer memory loss, impeded speech and disorientation, and possibly become more susceptible to suicide. But CTE can only be diagnosed after death, which makes it difficult to research.

A number of football players have been diagnosed with it, including New York Giants running back Frank Gifford, Pittsburgh Steelers center Mike Webster, and San Diego Chargers and New England Patriots linebacker Junior Seau, who committed suicide in 2012.

Aaron Hernandez, formerly of the New England Patriots, practices before a game in 2012. Jim Rogash / Getty Images

Baez would not speculate as to whether Hernandez suffered from CTE, but said it's imperative to find out.

"We're leaving no stone unturned," he added.

Baez had said earlier that the Hernandez family has already received the rest of his body.

His fiancée and the mother of his daughter, Shayanna Jenkins-Hernandez, who took his name, filed a motion to preserve any evidence in his death and wants a preliminary injunction to stop the state from destroying potential evidence concerning his death. That includes videos, documents and writings.

The plaintiff "intends to investigate all of the circumstances regarding Aaron Hernandez’s death," the motion says.

Hernandez was discovered hanging by a bed sheet attached to his cell window at Souza-Baranowski Correctional Center in Shirley at around 3:03 a.m. Wednesday, and he was pronounced dead at a local hospital.

Related: How Aaron Hernandez's Death Voids Murder Conviction

Hernandez was not on suicide watch, prison officials said. Investigators determined Hernandez was alone at the time, and there were no signs of a struggle, the district attorney's office and state police said in a statement.

The district attorney's office and state police said Thursday that Hernandez was locked in his cell at 8 p.m. Tuesday and no one entered until a correction officer saw him hanging and forced open the cell door, which had been jammed with cardboard.

Three hand-written notes and a Bible were found, but the district attorney’s office did not say what was on the notes.

Last Friday, Hernandez was found not guilty of murder in a 2012 drive-by shooting that claimed two lives. A judge, however, sentenced him to four to five years for a weapons charge.

The state Supreme Judicial Court was still reviewing an appeal of Hernandez's murder conviction, and Baez said he was looking forward to clearing his name and never thought Hernandez would kill himself.

Hernandez was convicted of first-degree murder in 2015 in the shooting death of Odin Lloyd, a friend and semipro football player who was dating the sister of Jenkins-Hernandez.