Ms. Arroyo, 44, was working overtime and on her way to help a pregnant woman. She stopped the ambulance and got out to figure out what was happening.

Image Yadira Arroyo Credit... Fire Department of New York, via Associated Press

Mr. Gonzalez had just thrown a teenage boy against a fence and stolen his backpack, a criminal complaint said, pretending to be a police officer and telling the boy he was arresting him. Now, Mr. Gonzalez was saying that he had hurt his hand and needed help. Ms. Arroyo, who was familiar with the strange and sometimes scary encounters that emergency medical workers endure, told him to return the backpack.

Instead, Mr. Gonzalez took a few steps, then spun around and ran into the open driver’s side door, Deputy Chief Jason Wilcox, commanding officer of Bronx detectives, said. Ms. Arroyo tried to pull him out. From the passenger seat, her partner fought him, but Mr. Gonzalez put the ambulance into reverse, trapping Ms. Arroyo underneath and eventually dragging her into an intersection.

Her death plunged the city’s medical workers into mourning and sent ripples beyond the city. The specter of an intoxicated, mentally ill man turning an ambulance into a weapon was a stark reminder of the random dangers of a profession whose practitioners often get second billing to their firefighter colleagues. And Mr. Gonzalez’s case — the second in recent months in which a man with a history of crime and mental illness killed a public safety worker in New York City — renewed concerns about the shortcomings of the systems that treat violent and vulnerable people.

The episode was all the more chilling for how the lives of Mr. Gonzalez and Ms. Arroyo had brushed up against each other in recent years. Several people knew both of them from their block, on Creston Avenue, a few blocks south of Fordham Road and just east of the Grand Concourse.