Barack Obama is flying to the Connecticut town devastated by America's second-deadliest school shooting to mourn with relatives of the 20 children and six adults who lost their lives.

The president will attend an interfaith vigil in the evening in Newtown, where he will also visit the families of those who lost children in Friday's massacre, carried out a 20-year-old local man, Adam Lanza. The gunman forced his way into Sandy Hook elementary school on Friday morning and opened fire on children and teachers before killing himself.

Obama has spoken of the need to "take meaningful action" to do something about America's dismal problem with mass shootings. The age of the victims – the children were all six or seven – has prompted a particularly furious outcry against gun ownership in a country in which support for the right to own weapons remains strong.

Further details of the victims emerged when police published the names of those gunned down. The youngest victim, Noah Pozner, celebrated his sixth birthday less than a month ago, on 20 November. Another victim, six-year-old Dylan Hockley, was British. His family moved to Connecticut nearly two years ago because they felt it was a safe place to raise and educate their children.

The 20 children killed in Newtown were all in first-grade classes when they were targeted by Lanza. Teachers managed to save other pupils by hiding them in cupboards or toilet cubicles. The list of the dead also revealed the names of the six adults who were killed. They included the principal, Dawn Hochsprung, 47, and school psychologist Mary Sherlach, 56. The other school staff who died were Rachel Davino, 29, Anne Marie Murphy, 52, Lauren Rousseau, 30 and Victoria Soto, 27. Soto taught many of the pupils who died.

In Kingston, New Hampshire, a police officer read a statement on behalf of James Champion, the brother of Nancy Lanza, killed by her son before he left their home for Sandy Hook school. It said: "Our hearts and prayers are with those who share in this loss."

Then, on behalf of Nancy's "devastated" mother, Dorothy Champion, the officer said: "We reach out to the community of Newtown to express our heartfelt sorrow for the incomprehensible loss of innocents that has affected so many."

In a moment of great compassion, one of the stricken parents extended his support to the family of the gunman. "I cannot imagine how hard this experience is for you. Our love and support goes out to you as well," said Robbie Parker, the father of six-year old Emilie.