CAMBRIDGE, Mass. — Officer Sean A. Collier was 27, not much older than the Massachusetts Institute of Technology students he watched over as a campus police officer, and he sometimes joined them in a game of darts or Xbox. So when an ambulance staffed by students rolled past his parked patrol car last Thursday night, he flashed his blue lights to say hello. The students answered with their red lights.

It was just a little after that routine interaction, the police said, that a pair of men approached Officer Collier’s squad car from behind and shot him to death, in what some law enforcement officials said appeared to have been a failed attempt to steal his gun. In the anguished scene that followed, the student emergency medical technicians were called back to the patrol car they had just passed, where they tried in vain to save Officer Collier’s life.

The killing of Officer Collier, who was mourned Wednesday at a campus memorial at which Vice President Joseph R. Biden Jr. spoke, was the first bloody altercation in a nearly 24-hour chain of violent events that left one of the brothers suspected in the Boston Marathon bombings dead and ended with the capture of the other. Interviews with law enforcement officials and witnesses painted a clearer picture of what happened during that chaotic period, and correct some of the information that officials gave out as they hunted the most wanted men in America.

Police officials initially announced that officers had “exchanged gunfire” Friday evening with the surviving suspect, Dzhokhar Tsarnaev, 19, as he hid in a boat in the backyard of a house in Watertown, Mass. Now several law enforcement officials say no gun was found in the boat, and officials say they are exploring what prompted officers to fire at Mr. Tsarnaev, who some feared was armed with explosives.