The gunman who killed four people in a Manhattan office building had chronic traumatic encephalopathy (CTE), a degenerative brain disease often linked to high-contact sports like American football, according to the New York City medical examiner's office.

In July, Shane Tamura, 27, drove from Las Vegas to New York City with an assault-style rifle, shooting four in a Park Avenue skyscraper before killing himself.

Police believe he was targeting the offices of the National Football League (NFL), which were inside the building.

In notes left at the scene, Tamura reportedly blamed the NFL for concealing the effects of CTE and asked for his brain be studied. CTE can only be diagnosed post-mortem.

New York City's chief medical examiner confirmed that the shooter's autopsy revealed "low-stage CTE," with an "unambiguous" diagnosis. This disease is caused by repeated blows to the head and has been found in the brains of many former NFL players. Symptoms include memory loss, depression, and progressive dementia, and the physical and mental effects of CTE are still under study.

Tamura, a former high school football player who did not play in the NFL, opened fire in a building where the American football league headquarters was located but inadvertently took the wrong lift.

His alleged suicide note included a plea to "study my brain please" and an apology.

Among those killed in the shooting were NYPD officer Didarul Islam, and employees from finance and management sectors. NFL employee Craig Clementi was also seriously injured.