She told him it was all in his head. No one was out to get him. No one was at the door. Those lights were from passing cars — not coded language that he said he alone could understand. She tried to steer him to hospitals, into ambulances and toward help.

On the Fourth of July night when it all ended, concern had turned to desperation. She called 911, tried to flag down police cars and ambulances, seeking intervention when reason failed. Finally, overwhelmed, she left Alexander Bonds, her boyfriend of six months, on a street corner in the Bronx.

Perhaps less than an hour later, Mr. Bonds walked up to a mobile police command center stationed on East 183rd Street and fired a single shot through the passenger-side window, killing Officer Miosotis Familia as she sat inside.

Mr. Bonds was killed moments later in a shootout with officers. There was little evidence of what had led him to open fire on a police officer; he left no manifesto, little public warning except on Facebook, where he expressed anger at prison guards and police officers. Police investigators immediately focused on the last few hours and days of Mr. Bonds’s life.