In the end, it was a high-tech gadget that allowed the FBI to identify the first Boston bomber in the video, the man agents called “Black Hat.”

This gadget — and the story of how the name of one bomber ended up in an FBI database — has revealed a great deal about the inner workings of the bureau, as well as its relations with an extensive network of countries in the pursuit of terrorism suspects. A wide variety of information is now exchanged internationally.

The gadget was used about 1 a.m. on Friday (April 19), eight hours after the FBI released photos and video of the bombing suspects – images of two men with backpacks strolling through the crowd at the Boston Marathon. One was wearing a black hat; the other a white hat turned backward.

It was three days after the two explosions at the finish line of the Boston Marathon — and the FBI still did not know the identities of the two suspects.

Then, in the Boston suburb of Watertown, a furious firefight broke out between police and the two men. About 200 rounds of ammunition were exchanged, and explosive devices were thrown at the police by the suspects. Black Hat was felled by the bullets and rushed to the hospital, where he was pronounced dead. The second man escaped in the Mercedes SUV the two had carjacked earlier.