The 20-year-old gunman, identified by law enforcement sources as Adam Lanza, fired what witnesses described as dozens of shots in Sandy Hook Elementary School in Newtown, Connecticut, which serves children from ages 5 to 10. Lanza attended the school himself as a youngster.
Authorities found 18 children and seven adults, including the gunman, dead at the school, and two children were pronounced dead later after being taken to a hospital.
Another adult was found dead at a related crime scene in Newtown, bringing the toll to 28, state police Lieutenant Paul Vance said. Police would not confirm or deny media reports that the person was Lanza's mother, Nancy.
As reports of the shooting spread, panicked parents rushed to the school searching for their children as students covered in blood were being carried out of the building.
President Barack Obama, wiping away tears and pausing to collect his emotions in an address to the nation, mourned the "beautiful little kids between the ages of 5 and 10 years old" who were killed.
"Our hearts are broken today, for the parents, and grandparents, sisters and brothers of these little children and for the families of the adults who were lost," Obama said, his voice cracking.
Hundreds of Newtown residents gathered to mourn on Friday night at St. Rose of Lima, the Catholic church near the school.
"(The) important thing is that we're here for the families, and it won't be just tonight. It will be as long as is necessary for them to grieve, for them to come out of their grievance and come back to normal, although I don't see how you can actually come back to normal after something like this," said Kenneth Adams, 81, as he entered the church with his wife, Amelia.
Connecticut Governor Dannel Malloy and Richard Blumenthal, a U.S. senator from the state, spoke at the service, although the crowd appeared most moved by Monsignor Robert Weiss, who had spent the day at a firehouse consoling victims' families.
"Life has changed forever in Newtown," Weiss said. "We have 20 new saints today. We have 20 beautiful angels."
The holiday season tragedy was the second shooting rampage in the United States this week and the latest in a series of mass killings this year, and was certain to revive a debate about U.S. gun laws.
Two former classmates recalled Lanza as a shy and unusually intelligent student.
In Newtown High School, he dressed more formally than other students, often wearing khaki pants, button-down shirts and at times, a pocket protector, said Tim Arnone who first met Lanza at Sandy Hook Elementary.
The two of them joined the high school's audio-visual club, also known as a tech club, and spent free periods playing video games at the school's television station studio.
"It was definitely the nerdiest club in the school, Arnone, 20, told Reuters.
He said Lanza was "driven hard" to succeed academically by his parents, particularly his mother. "She pushed him really hard to be smarter and work harder in school," Arnone said.
State police refused to confirm any details about the Lanzas, saying they hoped to have more information on Saturday.
The New York Times reported Lanza used a Sig Sauer and a Glock, both handguns, and said police also found at the scene a Bushmaster .223 M4 carbine, a rifle, that they believe belonged to him.
His brother, Ryan Lanza, was "either in custody or being questioned," a law enforcement source said.
The chaos struck as children gathered in their classrooms for morning sessions at Sandy Hook Elementary in Newtown, a wealthy, wooded suburb of 27,000 in Fairfield County, about 130 km northeast of New York City.
A state police spokesman said the shootings took place in two rooms, w hich the Hartford Courant described as first-grade classrooms. Witnesses reported hearing dozens of shots; some said as many as 100 rounds.
Melissa Murphy, who lives near the school, monitored events on a police scanner.
"I kept hearing them call for the mass casualty kit and scream, 'Send everybody! Send everybody!'" she said. "It doesn't seem like it can be really happening. I feel like I'm in shock."
A girl described to NBC Connecticut hearing seven loud "booms" while she was in gym class. Other children began crying and teachers moved the students to an office, she said.
"A police officer came in and told us to run outside and so we did," the unidentified girl said on camera.
Images from the scene showed children being led away in single file, each child's hands clutching the shoulders of the one in front. Police wearing body armor and carrying rifles swarmed the scene and locked down the school.
NBC News reported that police finally began removing the children's bodies from the school late on Friday, more than 12 hours after the shootings, and that parents were being called in to identify them.
Obama ordered flags flown at half-staff at U.S. public buildings.
"As a country, we have been through this too many times," Obama said, ticking off a list of recent shootings.
"We're going to have to come together and take meaningful action to prevent more tragedies like this, regardless of the politics," Obama said in apparent reference to the influence of the National Rifle Association over members of Congress.
Obama remains committed to trying to renew a ban on assault weapons, White House spokesman Jay Carney said.
New York Mayor Michael Bloomberg, founder of the advocacy group Mayors Against Illegal Guns, said it was "almost impossible to believe that a mass shooting in a kindergarten class could happen.
"We need immediate action. We have heard all the rhetoric before. What we have not seen is leadership - not from the White House and not from Congress," he said. "That must end today."
Outside the White House gates, about 200 people rallied on a cold evening in favour of gun restrictions.
The toll in Newtown exceeded that of one of the most notorious U.S. school shootings, the 1999 rampage at Columbine High School in Littleton, Colorado, where two teenagers killed 13 students and staff before killing themselves.
The United States has seen a number of shooting rampages this year, most recently in Oregon, where a gunman killed two people and then himself at a shopping mall on Tuesday. The deadliest came in July at a midnight screening of a Batman film in Colorado that killed 12 people and wounded 58.
In 2007, 32 people were killed at Virginia Tech university in the deadliest act of criminal gun violence in U.S. history.