Louie Cohn walked through the vigil that formed on Boston Common Tuesday night, holding 26 daffodils. She approached Lizzie Lee, an engineer who had traveled from Lynnwood, Wash., to run the marathon on Monday, and offered her one of the flowers.

“They’re for the 26 miles of the Boston Marathon,” said Ms. Cohn, who lives in Sturbridge, Mass., before she broke down in tears, embracing Ms. Lee. The two women wept, holding each other and exchanging their names and where they were from.

Around them, hundreds had gathered at the Parkman Bandstand on the common, trying to keep candles lit as wind whipped around them and a choir sang songs like the national anthem and “Amazing Grace.”

“This terrible event happened in the midst of what represents all the best of Boston — the competition, the striving, the celebration of who we are in a patriotic way,” said Susan Springer, a psychologist from Westwood, Mass., who was at the vigil. “Such a perfect day, such a wonderful celebration, and then to have this happen — I wanted to find a way to come together as a community.”

Ms. Lee, the engineer, who is originally from Venezuela, was stopped just blocks from the finish line. When she heard the blast, she said, she felt immediate relief that her daughter had decided to cancel her trip from Venezuela to watch her run. She chose to stay at home because of the volatility following the country’s presidential election.

“My running partner told me, she texted me, saying, ‘Who would have thought that your daughter would have been safer in Venezuela than in Boston?’ ” Ms. Lee said.