Hundreds of terrified parents, fearing the worst, descended on the school in Newtown, about 65 miles north of New York City, after news of the shootings spread. Many arrived as their sobbing children were led out, each with a hand on the shoulder of the child in front. But by that time, all the victims were shot and most were dead, as was the gunman, identified as Adam Lanza, who committed suicide. The children who were killed were said to be from five to 10 years old.
A 28th person was found dead in a house in the town and was also believed to have been shot by Lanza. That victim, one law enforcement official said, was Lanza's mother, Nancy Lanza, a teacher at the school, Sandy Hook Elementary School.
The rampage, coming less than two weeks before Christmas, was the nation's second-deadliest school shooting, exceeded only by the 2007 Virginia Tech massacre, in which a gunman killed 32 people and then himself.
Law enforcement officials said Lanza had grown up in Newtown, and he was remembered by high school classmates as smart, introverted and nervous. They said he had gone out of his way to not attract attention when he was younger. Several said they believed he suffered from Asperger's syndrome.
The gunman was chillingly accurate. A spokesman for the state police said that only one person had been injured at the school. All the others hit by the barrage of bullets died, suggesting that they were shot at point-blank range. Lanza's rifle was similar to a weapon widely used by troops in Afghanistan and Iraq.
One law enforcement official said the shootings occurred in two classrooms in one portion of the school. The principal was among the dead.
Law enforcement officials offered no hint of what motivated Lanza. They were trying to determine if he suffered from a personality disorder. One official said that investigators were asking why - if Lanza's rage was directed mainly toward his mother, as appeared to be the case - he had opened fire on other people's children.
FBI agents interviewed his brother, Ryan Lanza, in Hoboken, N.J.; his father, Peter Lanza, who was divorced from Nancy Lanza, was also expected to be questioned, one official said.
Newtown, a postcard-perfect New England town where everyone seems to know everyone else and where there had lately been holiday tree lightings with apple cider and hot chocolate, was plunged into mourning. Stunned residents attended four memorial services in the town Friday evening as detectives continued the search for clues.
Maureen Kerins, a hospital nurse who lives near the school, learned of the shooting from television and hurried to the scene to see if she could help.
"I stood outside waiting to go in, but a police officer came out and said they didn't need any nurses, so I knew it wasn't good," Kerins said.
In the cold light of Friday morning, faces had told the story outside the stricken school. There were the frightened faces of children who were crying as they were led out in a line. There were the grim faces of three women who emerged with their arms around one another, as if they were protecting the one in the middle. There were the relieved-looking faces of a couple and a little girl in a light blue jacket, riding high on her father's shoulders.
The shootings set off a tide of anguish nationwide. In Illinois and Georgia, flags were lowered to half-staff in memory of the victims. And at the White House, President Barack Obama struggled to read a statement in the White House briefing room.
More than once, he dabbed his eyes.
"Our hearts are broken," Obama said, adding that his first reaction was not as a president but as a parent. "I know there is not a parent in America who does not feel the same overwhelming grief that I do."
He called the victims "beautiful little kids."
"They had their entire lives ahead of them: birthdays, graduations, weddings, kids of their own," he said.
Then the president reached up to the corner of one eye.
Obama called for "meaningful action" to stop such shootings, but he did not spell out details. In his nearly four years in office, he has not pressed for expanded gun control. But he did allude Friday to a desire to have politicians put aside their differences to deal with ways to prevent future shootings.
New York Mayor Michael R. Bloomberg, who has been a vocal advocate for gun control, issued an exasperated statement after the president's speech.
"President Obama rightly sent his heartfelt condolences to the families in Newtown," Bloomberg said. "But the country needs him to send a bill to Congress to fix this problem. Calling for 'meaningful action' is not enough. We need immediate action."
Gov. Dannel P. Malloy of Connecticut, who went to Newtown, called the shootings "a tragedy of unspeakable terms."
"Evil visited this community today," he said.
Lt. J. Paul Vance, a spokesman for the Connecticut State Police, described "a very horrific and difficult scene" at the school, a one-story building that had 700 students in kindergarten through fourth grade. It had a security protocol that called for doors to be locked during the school day and for visitors to be checked on a video monitor inside.
"You had to buzz in and out and the whole nine yards," said a former chairwoman of the Newtown Board of Education, Lillian Bittman. "When you buzz, you come up on our screen."
But the lock system did not go into effect until 9:30 each morning, according to a letter sent to parents by the principal, Dawn Hochsprung, that was posted on several news websites. The letter was apparently written earlier in the school year; Hochsprung was among the dead, although no victims' names had been confirmed by the authorities.
Vance said the Newtown police had called for help from nearby police departments and had immediately begun a manhunt, checking "every nook and cranny and every room."
Officers were seen kicking in doors as they worked their way through the school.
Vance said the students who died had been in two classrooms in one section of the school. Others said that as the horror unfolded, students and teachers tried to hide in places the gunman would not think to look. Teachers locked the doors, turned off the lights and closed the blinds. Some ordered students to climb under their desks. The teachers did not explain what was going on, but they did not have to. Everyone could hear the gunfire.
Yvonne Cech, a school librarian, said she had spent 45 minutes locked in a closet with two library clerks, a library catalogue assistant and 18 fourth-graders.
''The SWAT team escorted us out,'' she said, and then the children were reunited with their parents.
Vance said 18 youngsters were pronounced dead at the school and two others were taken to a hospital where they were declared dead. All the adults who were killed at the school were pronounced dead there.
At the home of Hochsprung's daughter Cristina Hassinger, in Oakville, Conn., the family spent the afternoon waiting for word.
"We're looking for any hope," said Ryan Hassinger, a son-in-law of Hochsprung.
"I looked on Twitter and it says that she is passed," Hassinger said. But he added that the family was "just waiting."
A school board member, John Vouros, said he was too distraught to talk about Hochsprung.
"I absolutely cannot," he said when reached by telephone. "I also taught in this district for 35 years, so I cannot. All I see are those children in that classroom."
Law enforcement officials said the weapons used by the gunman were a Sig Sauer and a Glock, both handguns. The police also found a Bushmaster .223 M4 carbine at the school that they believed belonged to the gunman.
"He visited two classrooms," said a law enforcement official at the scene, adding that those two classrooms were next to each other.
The first 911 call was recorded about 9:30 and said someone had been shot at the school, an almost unthinkable turn of events on what had begun as just another chilly day in quiet Newtown. Soon, frantic parents were racing to the school, hoping their children were all right. By 10:30, the shooting had stopped. By then, the police had arrived with police dogs.
"There is going to be a black cloud over this area forever," said Craig Ansman, who led his four-year-old daughter from the preschool down the street from the elementary school. "It will never go away."