(CNN) The family of Aaron Hernandez plans to donate his brain to scientists to determine whether he had Chronic Traumatic Encephalopathy, the degenerative brain disease linked to a number of NFL athletes.
After some disagreement over its custody, the brain will be released to the Boston University CTE Center for further examination, according to the Worcester County District Attorney's Office.
Earlier on Thursday, Hernandez family attorney Jose Baez said the brain was being held "illegally" by the Massachusetts Office of the Chief Medical Examiner.
"It is our position that they are holding Aaron Hernandez's brain illegally," he said. "They have released the body and withheld Aaron's brain."
The medical examiner's office said it wanted to complete its investigation into the death before releasing the brain.
"No one is going to stand in the way of the family's wishes for Boston University to have Aaron Hernandez's brain," Dan Bennett, secretary of public safety and security, said in a written statement.
The brain custody battle came a day after prison officials said Hernandez, a former NFL star for the New England Patriots, hanged himself with a bedsheet attached to a window in his prison cell.
Hernandez, 27, was serving a sentence of life without parole for the June 2013 murder of Odin Lloyd. His death came less than a week after he was acquitted in a separate double-murder trial.
Baez, who has been retained by the Hernandez family to investigate his death, had said he may take the medical examiner's office to court.
Hernandez's body is at Faggas Funeral Home in Watertown, Massachusetts, according to funeral home secretary Jennifer Smith.
Baez said the family made arrangements for the Boston University CTE Unit to take possession of the brain, and the medical examiner's office agreed to those plans.
"The family of Aaron Hernandez has decided to donate to this study so that we could possibly help other young men who decide to play football, and to help further that cause, and also possibly shed light and more evidence on this case," Baez said.
The Boston University CTE Center, led by Dr. Ann McKee, has found evidence of CTE in the brains of 200 people, including in high school and professional football players.
The degenerative disease is believed to be caused by repeated head trauma, and has been found in famed NFL players including Junior Seau and Dave Duerson. Scientists can only diagnose the disease after death.
The CTE Center declined to discuss Hernandez's brain.
"It is our policy that we do not and cannot discuss any ongoing, completed or potential case(s) without specific consent from the family," the center said.