WATERTOWN, Mass. — Celebrations erupted in suburban Boston, downtown and beyond Friday night as the capture of the remaining marathon bombing suspect was announced in a tweet from police.

In the Watertown neighborhood where 19-year-old Dzhokhar Tsarnaev engaged in a firefight with police while hiding out in a parked boat, dozens of people at a police barricade cheered and applauded as law enforcement officers and emergency responders left the scene.

“Never in my wildest dreams did I think that this would result in a shootout in Watertown,” said Sheamus McGovern, of Belmont, Mass., who was among the crowd of people gathered outside Mount Auburn Hospital, where Tsarnaev was taken after his capture.

Early Friday morning, 26-year-old Tamerlan Tsarnaev was killed in a gun battle and car chase during which he and his younger brother hurled explosives at police from a stolen car, authorities said.

During the getaway attempt, the brothers killed an MIT policeman and severely wounded another officer, authorities said. The younger brother managed to escape and was found in the boat about a mile away hours later.

McGovern had been startled overnight Friday during a when he heard “what sounded like firecrackers, last night after one, and then pure bedlam.” He could hear the helicopters overhead all day.

“It’s just a huge relief to be able to get outdoors. Another day of that, I don’t want to start getting angry,”

The jubilation was widespread. The mayor of Boston, which was largely paralyzed during the manhunt Friday, tweeted, “We got him!” And at the home of the New York Mets, fans leapt to their feet and cheered when the news spread during a game against the Washington Nationals.

Hundreds of people marched down Commonwealth Avenue, chanting “USA” and singing the Red Sox anthem “Sweet Caroline” as they headed toward Boston Common. Police blocked traffic along part of the street to allow for the impromptu parade.

Earlier, the mood was somber. On Boylston Street, three blocks from the site of the marathon explosions on Monday, several dozen people gathered almost in complete silence. Some were crying.

Boston University student Aaron Wengertsman, 19, wrapped himself in an American flag as a silent crowd gathered. He was on the marathon route a mile from the finish line when the bombs exploded.

“I’m glad they caught him alive,” Wengertsman said. “I thought people might be more excited, but it’s humbling to see all these people paying their respects.”

Nearby, 25-year-old attorney Beth Lloyd-Jones said it felt like she had her city back. She was blocks away from the blast in her south end home on Monday.

“That could have been any one of us,” she said of the victims. “Now I feel a little safer.”

Bathed in the flashing lights from Kenmore Square’s iconic rooftop Citgo sign, Boston University juniors Brendan Hathaway and Sam Howes high-fived strangers as they walked down the street.

“This was like our first opportunity to really be outside without feeling like there imminent danger,” said Hathaway, a mechanical engineering student from nearby Newton. “It was close to home for me.”

In Boston’s Dorchester neighborhood, where an 8-year-old boy killed in the bombing lived, people set off fireworks Friday night to celebrate.