The socially isolated, violence-obsessed man who carried out the 2012 massacre at Sandy Hook Elementary School had severe mental and emotional problems that went largely ignored by schools and possibly his parents, according to a report released Friday.

The Office of Child Advocate, which investigates all child deaths in the state, concluded that "weaknesses and lapses in the educational and healthcare systems' response and untreated mental illness played in Adam Lanza's deterioration."

The agency released its report nearly two years after Lanza killed his mother then shot his way through the Newtown school, gunning down 20 children and six educators before committing suicide.

Get Breaking News Delivered to Your Inbox

The report notes that Lanza suffered from "significant developmental challenges from earliest childhood" and his preoccupation with violence appeared to go unaddressed by the school system and even his parents.

Authorities found violence-lanced writings and an arsenal of weapons in the Newtown home where he lived his mother, Nancy Lanza, and spent long hours playing shooter video games.

The authors of the 114-page report noted that although numerous mental health issues were not properly addressed and recommendations regarding Lanza's care went unheeded, they could not say whether more effective treatment could have prevented the tragedy.

"This report raises, but cannot definitively answer, the question as to whether better access to effective mental health and educational services would have prevented the tragic events at Sandy Hook," they wrote.

At different stages of his childhood, Lanza was diagnosed with Autism Spectrum Disorder, anxiety, Obsessive Compulsive Disorder, and Asperger syndrome. The report says that Lanza resisted taking medication for his anxiety and Obsessive Compulsive Disorder - a decision that was apparently supported by his mother. Lanza also apparently disagreed with his Asperger's diagnosis.

The report concluded that the school system cared about Lanza's success but also "unwittingly enabled Mrs. Lanza's preference to accommodate and appease" him.

Adam Lanza apparently cut off contact with his father in 2010 and "did not respond to numerous emails Mr. Lanza sent between 2010 and 2012 seeking to spend time with him." Lanza's parents separated in 2001 when he was nine years old.

The report also asks whether a family that was not white or as affluent as the Lanzas would have been given the same leeway to manage treatment for their troubled child.

"Is the community more reluctant to intervene and more likely to provide deference to the parental judgment and decision-making of white, affluent parents than those caregivers who are poor or minority?" the report said.

The authors of the report also noted that Lanza's parents and the school tended to view him as "intellectually gifted" even though psychological testing indicated his cognitive abilities were average.

Documents released by police in December 2013 included descriptions of sporadic treatment for his mental health troubles. At one point, experts at the Yale Child Studies Center prescribed antidepressant/anti-anxiety medication, but his mother discontinued the treatment after her son was unable to raise his arm after taking the medicine and never scheduled follow-up visits, police reports said.

The Yale Child Study Center, which evaluated Lanza at age 14, recommended that Lanza receive "extensive special education supports, ongoing expert consultation, and rigorous therapeutic supports embedded into (his) daily life."

Those recommendations, the report said, went largely unheeded.

A Connecticut judge last year ordered Newtown school officials to give Lanza's records the Office of Child Advocate for its investigation. The governor's Sandy Hook Advisory Commission has been waiting for the office's report before releasing its recommendations on what the state can do to prevent and respond to future incidents.