Some runners were approaching the end of the 26.2-mile race when the two blasts, in rapid succession, sent them running away from the finish line.

“The first one went off, I thought it was a big celebratory thing, and I just kept going,” recalled Jarrett Sylvester, 26, a runner from East Boston, who said it had sounded like a cannon blast. “And then the second one went off, and I saw debris fly in the air. And I realized it was a bomb at that point. And I just took off and ran in the complete opposite direction.”

There were conflicting reports about how many devices there were. One law enforcement official said there had been four: the two that exploded at the marathon and two others that were disabled by the police. The official said that the devices appeared to have been made with black powder and ball bearings, but that investigators were unsure how the two that exploded had been set off.

It was unclear Monday evening who might be responsible for the blast. Although investigators said that they were speaking to a Saudi citizen who was injured in the blast, several law enforcement officials took pains to note that no one was in custody.

Some law enforcement officials noted that the blasts came at the start of a week that has sometimes been seen as significant for radical American antigovernment groups: it was the April 15 deadline for filing taxes, and Patriots’ Day in Massachusetts, the start of a week that has seen violence in the past. April 19 is the anniversary of the 1995 bombing of the Alfred P. Murrah Federal Building in Oklahoma City.

The explosive devices used in the attacks on Monday were similar in size to the device used in the 1996 attack at the Centennial Olympic Park bombing in Atlanta but were not nearly as large as the one used in Oklahoma City. In the Atlanta attack, a pipe bomb was detonated near pedestrians, killing 2 and injuring more than 100 — similar numbers to Monday’s attack.

The attack in Oklahoma City was far larger because the perpetrator used a truck packed with thousands of pounds of explosives. The device killed more than 150 people.

Image Site of the Boston Marathon explosions. Credit... Aerial image from Pictometry International

The attack on Monday occurred in areas that had been largely cleared of vehicles for the marathon. Without vehicles to pack explosives into, the perpetrators would have been forced to rely on much smaller devices.

Officials stressed that they had no suspects in the attack. The Saudi man, who was interviewed at Brigham and Women’s Hospital, had been seen running from the scene of the first explosion, a person briefed on preliminary developments in the investigation said on Monday afternoon. A law enforcement official said later Monday that the man, was in the United States on a student visa and came under scrutiny because of his injuries, his proximity to the blasts and his nationality — but added that he was not known to federal authorities and that his role in the attack, if any, was unclear.

The explosions brought life in Boston to a halt. Police officials effectively closed a large part of the Back Bay neighborhood, which surrounds the blast site; some transit stops were closed; planes were briefly grounded at Boston Logan International Airport and the Boston Symphony Orchestra canceled its Monday night concert. A Boston Celtics game scheduled for Tuesday was also canceled.

Boston was bracing for a heightened law enforcement presence on Tuesday, with its transit riders subject to random checks of their backpacks and bags, and many streets in the center of the city likely to be closed to traffic as the investigation continues. Gov. Deval Patrick said Monday night that “the city of Boston is open and will be open tomorrow, but it will not be business as usual.”

Boston’s police commissioner, Ed Davis, urged people to stay off the streets. “We’re recommending to people that they stay home, that if they’re in hotels in the area that they return to their rooms, and that they don’t go any place and congregate in large crowds,” he said at an afternoon news conference.

It had begun as a perfect day for the Boston Marathon, one of running’s most storied events, with blue skies and temperatures just shy of 50 degrees. The race typically draws half a million spectators. And long after the world-class runners had finished — the men’s race was won by Lelisa Desisa Benti of Ethiopia, who finished it in 2 hours, 10 minutes and 22 seconds — the sidewalks of Back Bay were still thick with spectators cheering on friends and relatives as they loped, exhausted, toward the finish line.

Dr. Natalie Stavas, a pediatric resident at Boston Children’s Hospital, was running in the marathon with her father and was nearing the finish line when the explosions shook the street.