Drawing on his past experiences, Obama said he was mindful that mere words would not be enough to heal the depths of Newtown's sorrow.
"I can only hope that it helps for you to know that you are not alone in your grief," Obama said during the vigil, which followed his private meeting with families of the victims.
The president closed his remarks by reading the first names of the kids, slowly, in the most wrenching moment of the night. Cries and sobs filled the room.
Said Obama of the girls and boys who died: "God has called them all home. For those of us who remain, let us find the strength to carry on and make our country worthy of their memory."
Inside the room, children held stuffed teddy bears and dogs. The smallest kids sat on their parents' laps.
There were tears and hugs, but also smiles and squeezed arms. Mixed with disbelief was a sense of a community reacquainting itself all at once.
One man said it was less mournful, more familial. Some kids chatted easily with their friends. The adults embraced each other in support.
"We're halfway between grief and hope," said Curt Brantl, whose daughter was in the library of the elementary school when the shootings occurred. She was not harmed.
Police and firefighters got hugs and standing ovations when they entered. So did Obama.
"We needed this," said the Rev. Matt Crebbin, senior minister of the Newtown Congregational Church. "We needed to be together to show that we are together and united."
The shootings have restarted a debate in Washington about what politicians can to do help — gun control or otherwise. Obama has called for "meaningful action" to prevent killings.