Obama arrived in Boston this morning with his wife, Michelle, and addressed the full 2,000-seat Roman Catholic Cathedral of the Holy Cross for the interfaith service dubbed Healing Our City.
Obama said if whoever attacked the city sought to intimidate victims or shake American values, "it should be pretty clear by now that they picked the wrong city to do it. Not here in Boston."
- Obama's words for Boston spread online
- Canadian runners lace up for Boston
- Boston fans honour bombing victim
- Peter Mansbridge on the media's race to be first
The president compared Boston to 78-year-old runner Bill Iffrig, whose fall after one of the blasts has become one of the iconic images of the tragedy.
"We may be momentarily knocked off our feet," Obama said. "But we will pick ourselves up. We'll keep going. We will finish the race."
Obama paid tribute to the three victims who died — eight-year-old Martin Richard; restaurant manager Krystle Campbell, 29; and Chinese student Lu Lingzi, 23.
He also promised the bomber or bombers that they would be found. "You will face justice," he said.
The president told the people who had been injured that everybody is with them "as you learn to stand and walk and, yes, run again. Of that I have no doubt. You will run again … Because that's what the people of Boston are made of. Your resolve is the greatest rebuke to whoever committed this heinous act."
Remarks were also made by various spiritual leaders in the community, as well as Mayor Thomas Menino, who said he had never been more proud of the city and its people.
- Read a minute-by-minute timeline of the Boston Marathon attacks
- Read the latest updates on the Boston Marathon bombings investigation
- Learn the history of pressure cooker bombs
"It is a good morning, because we are together," Menino said. "We are one Boston. No adversity, no challenge, nothing can tear down the resilience at the heart of this city and its people."
The public service included selections by the Boston Children's Chorus and cellist Yo-Yo Ma.
People lined up hours ahead of the service to get into the cathedral, and two hours before people were already being turned away. City police were stationed on street corners across downtown, and some residents admitted they were nervous moving about in public spaces.
Among the hundreds in line before the service began was 18-year-old Eli Philips. The college student was a Marathon volunteer and was wearing his volunteer jacket on Thursday morning.
He said he's still shocked that "something that was euphoric went so bad."
Obama has stepped into the role as the nation's consoler-in-chief many times before in his presidency, most recently in December after the massacre of 20 first-graders and six educators at an elementary school in Newtown, Conn. Before that, there were the deadly shootings in Aurora, Colo., Tucson, Ariz., and Fort Hood, Texas, as well as the natural disasters that tore apart towns and neighbourhoods in Missouri and the New York-New Jersey area.