Richard Rojas did not speak much about his three years in a Navy uniform, but when he returned to the Bronx from a naval base in Jacksonville, Fla., in 2014, he was a different man.

His mind was clouded with conspiracy theories. His dreams of opening his own clothing business had wilted. He lashed out at friends who challenged him; some thought that his grasp of reality had slipped and that he needed psychiatric help.

During a string of arrests in recent years, Mr. Rojas once threatened to kill police officers, and last week he accused a notary of trying to steal his identity and grabbed the man’s neck, the authorities said. But despite his mounting aggression and mental health issues that began in childhood, friends and the authorities said, he never sought or received treatment, instead burrowing deeper into his paranoia, and smoking marijuana and drinking.

On Thursday, Mr. Rojas, 26, was behind the wheel of a car that a friend said had been outfitted with a speeding detection system after a previous drunken-driving arrest. Under a wall of billboards and bright advertisements in Times Square, he waited for traffic to pass and then made a U-turn before accelerating and plowing through three and a half blocks of sidewalk crowds, killing an 18-year-old woman, Alyssa Elsman, and hurting 20 other people, the police said.