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.
“I wanted to kill them,” he told a traffic enforcement officer after crashing his Honda Accord, according to a criminal complaint filed in court on Friday.
Shortly after noon on Friday, Mr. Rojas appeared in Criminal Court in Manhattan and was formally charged with murder and 20 counts of attempted murder, as his family members watched solemnly from a back row. An assistant district attorney, Harrison Schweiloch, said Mr. Rojas had gone on a “murderous rampage” to kill as many people as possible and afterward proclaimed that the police should have shot him.
Mr. Rojas also told a police officer that he had smoked marijuana laced with PCP, or angel dust, a dangerous drug linked to temporary psychosis and violent behavior, the criminal complaint says.
Judge Tamiko Amaker ordered Mr. Rojas, his head down and his hands cuffed behind him, to be jailed to await trial.
Mayor Bill de Blasio, during an interview on WNYC on Friday morning, said Mr. Rojas’s family members had told the authorities that he had “demonstrated mental health issues going back to childhood that, like so many other such situations in our society, went unaddressed, even during the time he was in the U.S. military.”