President Obama said today that America stands with the city of Boston after the deadly terror bombing attacks at the Boston Marathon finish line on Monday.

In a powerful, uplifting speech at an interfaith service at the Cathedral of the Holy Cross, Obama said he had come to join people to “pray and mourn and measure our loss. We also come today to reaffirm that the spirit of this city is undaunted and the spirit of this country shall remain undimmed.”

At the conclusion of the speech, the 2,000 people in the crowd leapt to their feet, some with tears streaking their cheeks, to deliver a standing ovation. The crowd then joined in singing “America the Beautiful.”

Obama, who traveled to the city on Air Force One this morning with his wife, Michelle, and members of the state’s congressional delegation, promised that whoever planted the bombs would be brought to justice.

“Yes, we will find you,” he said. “And, yes, you will face justice. We will find you. We will hold you accountable, but, more than that, our fidelity to our way of life, to a free and open society, will only grow stronger — for God has not given us a spirit of fear and timidity but one of power and love and self discipline.”

He praised those who had rushed to aid the victims after the blasts, saying it sent a message to the attackers, whom he described as “these small stunted individuals who would destroy instead of build.”

“This doesn’t stop us. And that’s what you’ve taught us, Boston. That’s what you’ve reminded us — to push, to not grow weary, to not get faint, even when it hurts. We finish the race. And we do that because of who we are and we do that because we know that somewhere around the bend, a stranger has a cup of water. Around the bend, somebody’s there to boost our spirits. On that toughest mile, just when we think we’ve hit a wall, someone will be there to cheer us on and pick up.”

“Our prayers are with the injured -- so many wounded, some gravely. From their beds, some are surely watching us gather here today. And if you are, know this: As you begin this long journey of recovery, your city is with you. Your commonwealth is with you. Your country is with you. 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 as applause rained down. “You will run again.”

And he promised toward the end of the speech that the Boston Marathon would go on, as would the celebrations that have been held on the same streets for the city’s championship teams.

“When the Sox, the Celtics, the Patriots, the Bruins are champions again – to the chagrin of New York and Chicago fans – the crowds will gather and watch a parade go down Boylston Street. And 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 one hundred and eighteenth Boston marathon. Bet on it!’’ he thundered.

Former governor Mitt Romney, who lost the election to Obama, was one of those attending the service.

Obama has spoken in the past to try to comfort communities in shock and mourning. He spoke after the mass murders at Fort Hood in 2009, Tucson in 2011, and Aurora, Colo., and Newtown, Conn., in 2012. President Obama after the ceremony went to Massachusetts General Hospital. A White House spokesman said both he and Michelle Obama planned to meet with victims of the blast and their families and first responders.

Obama, who spoke for about 20 minutes to a packed crowd of about 2,000, was one of a series of speakers at the service, which lasted for an hour and a half. The other speakers included Cardinal Sean P. O’Malley, clergy, and Governor Deval Patrick and Mayor Thomas M. Menino.

The crowd also included former Massachusetts governors, including Mitt Romney, who challenged Obama in last year’s presidential election.

A symbol of determination himself, Menino stood up from a wheelchair, grimacing at his broken leg, to talk about the strength of his beloved city.

“I have never loved its people more than I do today,” Menino said this morning. “We are one Boston. Nothing can tear down the resilience of this city.” After a series of illnesses last fall, Menino, the city’s longest-serving mayor, announced he would not seek reelection. He recently suffered a broken leg.

Patrick said the “cowardice unleashed on us” should not cause people to lose their faith in America’s civic ideals.

“We have defined those ideals, through time and through struggle, as equality, opportunity, freedom and fair play. … And just as we cannot permit darkness and hate to triumph over our spiritual faith, so we must not permit darkness and hate to triumph over our civic faith. That cannot happen. And it will not.”

Mervyn Williams, 34, an X-ray technologist from Boston Medical Center who was on shift when bombing victims began streaming in Monday, sat in the second row with Yo-Yo Ma, wearing blue hospital scrubs.

“It was inspirational, the message of hope,” he said. “Menino’s message that, ‘This is Boston. Nothing will hold us down.” And ending with Obama — Wow!”

Wesley Lowery, Lisa Wangsness, and Martine Powers of the Globe staff contributed to this report. Andrew Ryan can be reached at acryan@globe.com Follow him on Twitter @globeandrewryan.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.