Media playback is unsupported on your device Media caption President Obama: "Every one of us stands with you"

US President Barack Obama has vowed at a memorial service for victims of the Boston marathon bombing the attack's perpetrators will be held accountable.

He told an interfaith ceremony that everyone had been touched by the attack on their beloved city.

He spoke as it emerged investigators had found clear video images of two potential suspects carrying black bags.

Two bombs were detonated near the finish line on Monday, killing three people and injuring more than 170.

The FBI is holding a press conference on the attacks.

There were several standing ovations as the president spoke earlier on Thursday at the Cathedral of the Holy Cross, the main Roman Catholic cathedral in Boston.

'Spirit undaunted'

Before his visit, the president declared a state of emergency in Massachusetts, which would allow the state to access federal funding to deal with the aftermath of the attacks.

We will find you, we will hold you accountable Barack Obama, US President Mardell: America's mourner in chiefIn pictures: Boston remembers

President Obama appeared in sombre mood as he joined city leaders, residents and victims at the prayer service.

He told the congregation: "The spirit of this city is undaunted; the spirit of this country shall remain undimmed.

"Everyone of us has been touched by this attack on your beloved city. Everyone of us stands with you. Because after all it's our beloved city too.

"They sought to intimidate us, to terrorise us," President Obama said, adding, "It should be pretty clear by now that they picked the wrong city to do it."

He was applauded as he warned the perpetrators of the attacks they would be brought to justice.

"We will find you," he said. "We will hold you accountable."

FBI caution

Crowds arrived early - in some cases as early as dawn - to wait for one of about 2,000 seats inside the cathedral.

Analysis The refusal by Boston investigators to release images of two potential suspects has kept journalists guessing. The agency will only say the pictures will be publicised when and if appropriate. Some media organisations have tried to circumvent the official investigation. The New York Post published a photo of two race attendees under the headline "Bag men", but later backtracked to say the pair were not suspects after all. It is not the first time journalists have got it wrong. In 1996, following the Atlanta Olympics bombing, reporters conducted a trial by media of security guard Richard Jewell, after it emerged the FBI were treating him as a suspect. But he was innocent. Karen Greenberg, director of Fordham Law School's Center on National Security, tells me: "The FBI wants to mitigate public hysteria and avoid any reaction that is not evidentiary based. That means - at this point - no photos."

The BBC's Laura Trevelyan in Boston said people gathered patiently in the early morning sunshine for security checks to get inside.

Hundreds of people stood outside the cathedral during the service, while police at the bomb site listened to the president's speech on the radios in their patrol cars.

Former Republican presidential challenger Mitt Romney also attended the prayer ceremony.

Later Mr Obama met with wounded victims, families and staff at Massachusetts General Hospital, and with race volunteers at a nearby high school.

First Lady Michelle Obama also visited patients at Boston Children's Hospital and Brigham and Women's Hospital.

At least 14 bombing victims, including three children, remain in hospital in a critical condition. It is reported that 10 victims have had limbs amputated. Nails and ball bearings were said to be embedded in their flesh.

On Thursday Homeland Security Secretary Janet Napolitano said the FBI wanted to speak to two men, but did not say they were suspects.

She did not give details of what was seen on the tape.

Ms Napolitano would not say whether the attacks were suspected to be the work of a domestic or foreign group, but said the investigation was continuing "apace".

She added that security had been ramped up at airports and transport hubs.

Investigators are going through thousands of images taken around the time of the attacks from security cameras, the media and people at the scene.

Officials have not said if they would publicly release more details of the case.

At least one of the Boston bombs was made from a pressure cooker packed with explosives, nails and ball bearings, investigators have told US media. The devices were placed in black bags and left on the ground.

The twin blasts killed Martin Richard, aged eight, Krystle Campbell, 29, and Lu Lingzi, a postgraduate student from China.