Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The driver behind the mayhem in New York City's Times Square that killed one and injured 22 others allegedly stated, "I wanted to kill them" and admitted to smoking PCP-laced marijuana before Thursday's violence.

Richard Rojas, 26, told a witness that he had wanted to kill the pedestrians of Times Square whom he hit with his 2009 Honda Accord, according to court documents. He also allegedly added that he smoked PCP-laced marijuana before the onslaught.

"I smoked marijuana," he told police, according to court documents. "I laced the marijuana with PCP."

The Bronx native is charged with aggravated vehicular homicide, 20 counts of attempted murder and second-degree murder.

"It appears to be intentional in the sense that he was troubled and lashing out," New York City Mayor Bill de Blasio said on WNYC radio on Friday.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Police and the Department of Homeland Security initially suggested it was an accident.

The mayor added that this was not an act of terror.

Richard Rojas crashed his vehicle into pedestrians, leaving an 18-year-old woman dead at the scene and another 22 injured, in New York City's Times Square midday on May 18, 2017. Charles Guerin / Bestimage / BACKGRID

"At the root of this from what we know so far is an untreated mental health issue likely going back decades," he added.

Drug and alcohol abuse are also at the center of the investigation. Rojas, who served in the Navy, has a history of driving while intoxicated arrests. Police said he was arrested for DWI twice and a DUI charge led to a dishonorable discharge from the Navy in 2014.

Court documents state that Rojas appeared glassy eyed and had slurred speech after the incident. He stated that "I smoked" before the rampage.

"There were some kind of drugs in his system," de Blasio said. "We don’t know the full analysis and whether the type of drugs in his system exacerbated his feelings in a negative way."

A total of 19 people were hospitalized after the attack and five are in critical condition. The woman killed was identified as 18-year-old Alyssa Elsman of Portage, Michigan. Her 13-year-old sister was one of the people injured and taken to the hospital, police said.

Alyssa Elsman, 18, of Portage, Michigan, is seen in this Instagram photo. Instagram

Rojas jumped the curb at 7th Avenue and W. 42nd Street, according to police. He drove three blocks to W. 45th Street where he struck a metal stanchion.

"All of a sudden I heard this boom and a car is barreling down Seventh Avenue hitting people, just, 'Boom! Boom!' And everyone just starts running," witness Kristen Boyce told NBC New York on Thursday. "We start running, we don't know if another one is going to come, we don't know what's happening, everyone is panicking."

The mayor told WNYC that the incident did not make city officials consider reconfiguring Times Square further to protect pedestrians. He noted that they had changed how they handled public gatherings because of terrorist-related "ramming attacks" in Europe.

A federal report found that 173 people have been killed and more than 700 wounded in 17 ramming attacks across the globe.

"We’re going to make decisions case-by-case, but we take this very seriously," the mayor said.