HARTFORD, Conn. -- The gunman who massacred 26 people at a Connecticut elementary school had written a book in the fifth grade about children being slaughtered and grew up to become obsessed with mass murders, according to a yearlong investigation into the Newton shooting.

Prosecutors closed the case into the Sandy Hook Elementary attack with a report that offered a chilling portrait of 20-year-old Adam Lanza as a loner bound by ritualistic behaviour.

But they were unable to answer the question that everyone has been asking since the tragedy: Why?

"The obvious question that remains is: 'Why did the shooter murder 27 people, including 20 children?' Unfortunately, that question may never be answered conclusively," the report said.

Lanza killed 20 first-graders and six educators with a semi-automatic rifle at the school on Dec. 14. He also shot his mother in the forehead inside their home. He committed suicide with a handgun as police arrived at the school.

The massacre, one of a string of mass shootings around the U.S., thrust the sensitive issue of gun control back into the national conversation. While efforts to pass major reforms stalled in Congress, several states toughened their gun laws.

Weeks before the Newtown shooting, Lanza's mother, Nancy, was concerned about her son and said that he hadn't gone anywhere in three months and would communicate with her by email only, even though they lived in the same house, according to the report.

However, she never expressed fear that she or anyone else was in danger from Adam, the report said. The guns he used in the attack had been purchased legally by his mother, who often took her son shooting and, according to the report, had written out a check to buy him a pistol for Christmas. Their house also contained knives, swords, spears and other sharp weapons.

Nancy Lanza was in New Hampshire the week before the shooting, arriving home the evening of Dec. 13.

Lanza "was undoubtedly afflicted with mental health problems; yet despite a fascination with mass shootings and firearms, he displayed no aggressive or threatening tendencies," Sedensky wrote.

Investigators said they interviewed members of Lanza's family -- his father and brother co-operated fully -- along with teachers and others. They said they also tried within the limits of privacy laws to gather information on his medical treatment.

They found no evidence he had taken any medication that would have affected his behaviour or explain the bloodbath.

Lanza "was under no extreme emotional disturbance for which there was a reasonable explanation or excuse," the report concluded.

It said that in fifth grade, Lanza wrote a book, "The Big Book of Granny," that included tales of children being slaughtered and a son shooting his mother in the head. The main character has a gun in her cane and shoots people, and another character likes hurting people, especially children. The spiral-bound manuscript was among items seized from his home. There is no indication he ever handed in the book at school.

In the years that followed, Lanza was fascinated by mass shootings, particularly the 1999 Columbine High School attack in Colorado, where 12 students and one teacher were killed. He assembled articles, photos, books, footage and violent video games, including one in which players gun down students in school. He even kept a spreadsheet ranking mass murders.

The summary released by the lead investigator, State's Attorney Stephen Sedensky III, describes Lanza as having "significant mental health issues" but sure knowledge of what he was planning: Besides having the spreadsheet, he smashed his computer hard drive and used earplugs during the shooting.

Sedensky said there was no clear indication why Lanza chose Sandy Hook Elementary other than that it was close to his home. He attended Sandy Hook from first through fifth grade, but he was never assigned to the classrooms where the shootings took place.

The report said that in 2005, Lanza was diagnosed with Asperger's disorder -- an autism-like condition that is not associated with violence -- and that he lacked empathy for others and behaved strangely. He seemed to have few friends.

"Some recalled that the shooter had been bullied; but others -- including many teachers -- saw nothing of the sort," the report said.

Nobody was allowed into Lanza's bedroom, not even to clean, according to the report. The windows of the room were covered with black trash bags. The report also said Lanza also disliked birthdays, Christmas and holidays and did not like to have his hair cut.

He also wouldn't touch doorknobs, his food had to be arranged on the plate in a certain way, and he changed clothes and washed his hands often during the day. He was a loner at school and was repelled by crowds and loud noises. His mother got rid of a cat because her son didn't want it in the house.

Sedensky said the hard drive taken from Lanza's bedroom might hold clues but was so damaged that data will probably never be extracted from it.

A timeline released with the report indicates that nearly six minutes passed between the arrival of the first Newtown police office and the time officers entered the school. The report said officers were operating under the belief there may have been more than one shooter.

Whether the delay made any difference was unclear. The report said Lanza killed himself about a minute after the first officer arrived.

Sedensky's report is a summary of a much larger state police evidence file that is expected to be released at a later date.

Sedensky has gone to court to fight release of the police tapes from the school to spare the victims' families the anguish. A judge said Monday he will listen to the recordings before deciding whether they can be made public.

The report said the first officer arrived behind the school at 9:39 a.m. Two other Newtown officers then arrived within seconds, and gunshots were heard in the background.

The last gunshot officers heard, which is believed to be the suicide shot by Lanza, was heard at three seconds past 9:40. Newtown officers entered the school at 47 seconds past 9:44, according to the report.