By Wednesday afternoon, Patrick said in an interview Saturday, investigators had narrowed in on images of Dzhokhar Tsarnaev as the most likely suspect. "It was a remarkable moment when they narrowed in on Suspect Number 2," he said.

Law enforcement officials debated whether to release the photos, weighing the risk of the suspects fleeing or staging another attack against the prospect of quicker identification. Officials said they went ahead with the public appeal for three reasons:

— Investigators didn't want to risk having news outlets put out the Tsarnaevs' images first, which might have made them the object of a wave of popular sympathy for wrongly suspected people, as had happened with two high school runners from the Boston area whose photos were published on the front page of the New York Post under the headline "Bag Men." At the news conference, FBI Special Agent in Charge Richard DesLauriers sternly asked the public to view only its pictures or risk creating "undue work for vital law enforcement resources."

— During a briefing Thursday afternoon, President Barack Obama was shown the photos of the suspects by senior members of his national security team. Senior administration officials said that although Obama was not asked to approve release of the images by the FBI, the president offered a word of caution after viewing them. Be certain that these are the right suspects before you put the pictures out there, he advised his national security team, according to the administration officials.

— Investigators were concerned that if they didn't assert control over the release of the Tsarnaevs' photos, their manhunt would become a chaotic free-for-all, with news media cars and helicopters, as well as online vigilante detectives, competing with police in the chase to find the suspects. By stressing that all information had to flow to 911 and official investigators, the FBI hoped to cut off that freelance sleuthing and attend to public safety even as they searched for the brothers.

Facial-recognition software did not identify the men in the baseball caps, according to Davis, who said that technology came up empty even though both Tsarnaevs' images exist in official databases: Dzhokhar had a Massachusetts driver's license, the brothers had legally immigrated, and Tamerlan had already been the subject of some FBI investigation.

The FBI had had contact with Tamerlan at least as far back as 2011. Tamerlan, whose ethnic Chechen family immigrated to the United States in 2002, had indicated his interest in radical Muslim ideology both on Internet ramblings and with family and friends. On YouTube, Tamerlan created a playlist of videos titled "Terrorists."

The brothers' mother, Zubeidat Tsarnaeva, told Russia Today television on Friday that Tamerlan "got involved in religious politics five years ago." She said FBI agents had been watching her son for "three to five years. They knew what my son was doing. . . . They used to tell me that he was really a serious leader and they are afraid of him."

The FBI said Friday that at the request of a foreign government that was concerned that Tamerlan "was a follower of radical Islam and a strong believer," the agency had interviewed him and his relatives but "did not find any terrorism activity, domestic or foreign." Officials have acknowledged that the request came from Russia.

Once the photos of the men in caps were made public Thursday, the FBI tip line filled with calls, including one from the brothers' aunt, who provided her nephews' identity, according to federal law enforcement officials.

As investigators expected, making the photos public not only brought in new information, but also spurred the brothers into action.

On Thursday evening, police responding to a robbery at a 7-Eleven in Cambridge, Mass. examined surveillance video and noticed that in addition to the robber, the convenience store had been visited that night by two men who looked like the bombing suspects.

Then, shortly after a Massachusetts Institute of Technology campus officer was shot and killed, police got reports of an armed carjacking of a black Mercedes SUV nearby. The brothers had forced the vehicle's driver to get them money from ATMs in the area. At a Shell station in Cambridge, the security camera provided "extremely good video of two suspects," a clear match with the photos from Boylston Street, Davis said.

In a violent confrontation with police in Watertown shortly after the carjacking episode, Tamerlan left the SUV and Dzhokhar, behind the wheel, tried to mow down police officers. In the process, he hit his brother, who was dragged under the car. Tamerlan died later that night. Police positively identified him by comparing his fingerprints against government records, Davis said.

The police commissioner said releasing images of the brothers may have spurred their violent spree. "We may have forced their hand by releasing the video," he said. But he said that was nonetheless the right move: "I truly believe they were planning more attacks based in the arsenal I saw in Watertown. By forcing their hand we saved a much larger loss of life. . . . These individuals were bent on murder and mayhem."

After a tense day of searches on the silent streets of a locked-down city, David Henneberry was eager to get some air. As soon as authorities lifted the stay-inside order Friday just before dusk, Henneberry stepped out of his Watertown house.

Something about his boat seemed off. The plastic cover was flapping in the wind, which made no sense, especially given that Henneberry had tied it down so well that it hadn't moved even through this winter's blizzards.

On inspection, the cover appeared to have been sliced open. Then Henneberry saw the blood. He came closer, pulled himself up a ladder to peer inside and saw more blood — and a curled-up form.

He called 911.

Within minutes, he was hurried out of his house and men in uniforms were firing at the boat and someone was shooting back.

Police had used thermal imaging technology to see that a human form was under the boat's white plastic cover. They pounded the boat with flashbang grenades, a powerful concussive force, to see if the suspect would react; he barely did. Finally, an FBI negotiator on a bullhorn roused Dzhokhar and spent 25 minutes persuading him to come out. Local police cuffed the suspect, who was then taken by ambulance for medical attention to two gunshot wounds, likely suffered the previous night in the shootout with police.

After the arrest, Davis, exhausted but relieved, stood in the rain and looked back on four frenzied days of rugged, hurried and dangerous police work.

"Four days ago, my city was ruthlessly attacked," he said. "There's no explaining the savagery involved here. . . . I've spent the last several days looking at hundreds of hours of video tape. I got to see how brutal the attack was, over and over and over again."

More important, he said, he watched how first responders and ordinary citizens put people back together. "Tourniquets," Davis said. "Stemming the bleeding with their hands. Putting a man who was on fire out with their hands. These are the kind of things that came out of this savagery. It makes me proud."