During an interfaith service honouring the victims of the Boston Marathon bombings, U.S. President Barack Obama recalled the strength and resiliency of the beloved city and its citizens, and warned that the perpetrators of the attack will face justice.

Speaking of the strength, kindness and courage showed by first responders, competitors and local residents, Obama said Boston, much like those injured in the bombings, will pick itself back up.

"I am here today on behalf of the American people with a simple message: Every one of us has been touched by this attack on your beloved city. Every one of us stands with you,” he said.

Obama also issued a stern warning to those responsible for the twin bombings, which killed three people and injured more than 170. “Yes, we will find you and yes, you will face justice," he said.

“They sought to intimidate us, to terrorize us, to shake us from those values… the values that make us who we are as Americans. Well it should be pretty clear by now that they picked the wrong city to do it.

“Not in Boston, not in Boston.”

Obama also spoke of his personal connection to the city, having studied there as a young law student.

“Boston may be your hometown, but we claim it too. It’s one of America’s iconic cities. It’s one of the world’s great cities,” he said, noting the city has long drawn people from around the world to its shores.

The president took time to remember the three victims killed in the bombings: Lu Lingzi, 23, Krystle Campbell, 29 and Martin Richard, 8. He said the country’s prayers were with their families.

He also noted the determined will of those injured, many of whom competed in the prestigious race.

“We will all be with you as you learn to stand, and walk, and yes, run again. Of that I have no doubt -- you will run again,” he said.

Obama said the city and its residents will heal and repair, and will not be fazed by the attack.

“At this time next year, on the third Monday in April, the world will return to this great American city to run harder than ever and to cheer even louder for the 118th Boston Marathon. Bet on it,” he said to thunderous applause.

Obama’s address set the tone for the sombre, but uplifting, ceremony.

In a passionate address, Massachusetts Gov. Deval Patrick said the tragic bombing exposed the “best” of its residents.

“We will grieve our losses and heal. We will rise and we will endure,” he said, adding that the country would remember that the “grace this tragedy has exposed is the best of who we are.”

Boston Mayor Thomas Menino -- who on the day of the bombings was in the hospital, where he checked himself out so he could be at the scene -- said no act of terror could “defeat the heart of a city.”

“Nothing will take us down, because we take care of one another,” he said, noting the courageous first responders and bystanders who rushed to help the injured and the kindness and charity of local residents and businesses who offered whatever they could.

The service took place as the country is still trying to come to terms with Monday’s deadly attack.

On Thursday, the FBI released images of two suspects who were captured on video surveillance cameras during the marathon. 

Before the service, the president and his wife, Michelle, visited with families of the victims and thanked volunteers who worked at marathon.

This is not the first time Obama has attended to communities reeling from tragedy. Last December he spoke at a vigil for the 20 first-graders and six educators who were shot and killed in Newtown, Conn.