"We will grieve our losses and heal," Patrick said. "We will rise, and we will endure. We will have accountability without vengeance, vigilance without fear."
Thursday's service included reflections by representatives of Protestant denominations, the Jewish, Muslim and Greek Orthodox faiths, and Cardinal Sean O'Malley, head of the Roman Catholic church in Boston.
The event was open to the public on a first-come, first-seated basis, but the line to try to get a ticket stretched at least two city blocks. There was a heavy police presence around the cathedral in the city's South End, and authorities closed nearby streets to traffic.
"I think it's important that we heal as well as those who were affected. I guess sometimes you feel you can't do a single thing, and this is something we can do," said Beth Anne Stevenson, a Boston Medical Center surgical intensive care unit nurse.
Ricky Hall, 67, of Cambridge, showed up at 8 a.m. and stayed even after he believed he wouldn't get inside.
"I came to pay my respects to the victims," he said.
Following the 90-minute service, Warren urged Bostonians not to succumb to fear.
"We will be vigilant but we will not be afraid," she said.
The Obamas met privately with the family of Krystle Campbell, 29, who was among those killed in the attack. The Obamas also visited with many of the injured in their hospital rooms at Massachusetts General Hospital and thanked the marathon volunteers who rushed toward danger to help the wounded.
Separately, the first lady met with patients, their families and hospital staff at Boston Children's Hospital and Brigham and Women's Hospital.
Obama has played this role before, serving as the nation's consoler in chief at times of heartbreaking tragedy. He's grieved with the families of those killed in shootings at Newtown, Conn., Tucson, Ariz., Aurora, Colo., and Fort Hood, Texas. And he's comforted residents in tornado-ravaged Missouri and storm-ravaged communities in New York and New Jersey.
Associated Press writer Bridget Murphy contributed to this report.
Follow Julie Pace on Twitter: http://twitter.com/jpaceDC