The gunman in the Connecticut shooting rampage committed suicide as the first response teams closed in, the governor said today, raising the spectre that Adam Lanza had planned an even more gruesome massacre and was stopped short.

Lanza blasted his way into the Sandy Hook Elementary School and used a high-powered rifle to kill 20 children and six adults, including the principal and school psychologist who tried to stop him.

Among his victims was British schoolboy Dylan Hockley. His family - English father Ian, American mother Nicole and his elder brother Jake - only moved from Hampshire to Newtown, Connecticut in January 2011.

In a feature for the local paper the Newtown Bee, believed to have been published earlier this year, Mrs Hockley said they lived in England for 18 years, where her husband worked for IBM, before moving to the Connecticut town, where they were "happy and comfortable" and near her relatives.

As President Barack Obama prepared to visit and churches opened their doors to comfort a grieving town today, federal agents fanned out to dozens of gun stores and shooting ranges across Connecticut, chasing leads they hoped would cast light on Lanza's life.

Among the questions: Why did his mother, a well-to-do suburban divorcee, keep a cache of high-power weapons in the house? What experience did Lanza have with those guns? And, above all, what set him on a path to shoot and kill 20 children, along with the adults who tried to stop him?

Speaking on ABC television's This Week, Governor Dannel Malloy said Lanza shot himself as police entered the building.

"We surmise that it was during the second classroom episode that he heard responders coming and apparently at that, decided to take his own life," Malloy said.

Malloy offered no possible motive for the shooting and a law enforcement official has said police have found no letters or diaries left behind that could shed light on it.

Lanza shot dead his mother, Nancy Lanza, at the home they shared on Friday, then drove to Sandy Hook Elementary School in her car with at least three of her guns, forced his way in by breaking a window and opened fire, authorities said. Within minutes, he killed the children, six adults and himself.

All the victims at the school were shot with a rifle, at least some of them up close, and all were apparently shot more than once, Chief Medical Examiner Dr H Wayne Carver said. There were as many as 11 shots on the bodies he examined.

All six adults killed at the school were women. Of the 20 children, eight were boys and 12 were girls.

Asked whether the children suffered, Carver said, "If so, not for very long." Asked how many bullets were fired, Carver said, "I'm lucky if I can tell you how many I found."

Parents identified the children through photos to spare them some shock, Carver said.

The terrible details about the last moments of young innocents emerged as authorities released their names and ages - the youngest aged six and seven, the oldest 56.

They included Ana Marquez-Greene, a little girl who had just moved to Newtown from Canada; Victoria Soto, a 27-year-old teacher who apparently died while trying to hide her pupils; and principal Dawn Hochsprung, who authorities said lunged at the gunman in an attempt to overtake him.

The tragedy has plunged Newtown into mourning and added the picturesque New England community of 27,000 people to the grim map of towns where mass shootings in recent years have periodically reignited the national debate over gun control but led to little change.

Residents and faith leaders were sure to reflect on the mass shooting and what meaning, if any, to find in it. Obama planned to attend an evening interfaith vigil - the fourth time he will have travelled to a city after a mass shooting.

Yesterday, overflow crowds packed St Rose of Lima Roman Catholic Church. The Rev Richard Scinto, a deacon, gave a homily.

"In the past 48 hours I've said the phrase 'I don't know' about 1,000 times," he said. "That not knowing has got to be the worst part of this whole thing."

At St John's Episcopal Church, 54-year-old Donna Denner, an art teacher at an elementary school in nearby Danbury whose classroom was locked down after the shooting, said she feels the same way she did after the September 11, 2001, terrorist attacks but isn't sure the rest of the country does.

"I don't know if the rest of the country is struggling to understand it the same way we are here," she said. "Life goes on, but you're not the same. Is the rest of the country - are they going about their regular activities? Is it just another news story to them?"

In the Vatican, Pope Benedict XVI told pilgrims and tourists today that he is praying for the families of the victims.

"I assure the families of the victims, especially those who lost a child, of my closeness in prayer," the pope said. "May the God of consolation touch their hearts and ease their pain."

The gunman's father, Peter Lanza, issued a statement yesterday relating his own family's anguish in the aftermath.

"Our family is grieving along with all those who have been affected by this enormous tragedy. No words can truly express how heartbroken we are," he said. "We are in a state of disbelief and trying to find whatever answers we can. We too are asking why. ... Like so many of you, we are saddened, but struggling to make sense of what has transpired."

The rifle used was a Bushmaster .223-calibre, according to an official with knowledge of the investigation.

The gun is commonly seen at competitions and was the type used in the 2002 sniper killings in the Washington, D.C., area. Also found in the school were two handguns, a Glock 10 mm and a Sig Sauer 9 mm.

A law enforcement official said authorities were investigating fresh leads that could reveal more about the lead-up to the shooting.

Ginger Colbrun, spokeswoman for the Bureau of Alcohol, Tobacco, Firearms and Explosives, said earlier there was no evidence Lanza was involved in gun clubs or had trained for the shooting.

Dean Price, director of the Wooster Mountain State Range - a shooting range in Danbury - said two ATF agents visited the range on Friday night and stayed into the early morning looking through thousands of names on sign-in logs.

He said that he had never seen Adam or Nancy Lanza there and that agents told him they did not find their names on the sign-in sheets.

Law enforcement officials have said they have found no note or manifesto from Lanza of the sort they have come to expect after murderous rampages such as the Virginia Tech bloodbath in 2007 that left 33 people dead.

Education officials said they had found no link between Lanza's mother and the school, contrary to news reports that said she was a teacher there. Investigators said they believe Lanza attended Sandy Hook many years ago, but they had no explanation for why he went there on Friday.

Authorities said Lanza had no criminal history, and it was not clear whether he had a job. A law enforcement official said Lanza had been diagnosed with Asperger's, a mild form of autism.

Richard Novia, the school district's head of security until 2008, who also served as adviser for the Newtown High School technology club, of which Lanza was a member, said he clearly "had some disabilities."

"If that boy would've burned himself, he would not have known it or felt it physically," Novia said in a phone interview. "It was my job to pay close attention to that."

Amid the confusion and sorrow, stories of heroism emerged, including an account of Hochsprung, 47, and the school psychologist, Mary Sherlach, 56, rushing toward Lanza in an attempt to stop him. Both died.

There was also 27-year-old teacher Victoria Soto, whose name has been invoked as a portrait of selflessness. Investigators told relatives she was killed while shielding her first-graders from danger. She reportedly hid some students in a bathroom or closet, ensuring they were safe, a cousin, Jim Wiltsie, told ABC News.

"She put those children first. That's all she ever talked about," said a friend, Andrea Crowell. "She wanted to do her best for them, to teach them something new every day."

There was also six-year-old Emilie Parker, whose grieving father, Robbie, talked to reporters not long after police released the names of the victims but expressed no animosity, offering sympathy for Lanza's family.

"I can't imagine how hard this experience must be for you," he said.