The driver of a car that ploughed into a crowd of pedestrians in New York's Times Square told police he wanted to "kill them all" and said officers should have shot him, according to prosecutors.

Richard Rojas said he had been smoking marijuana laced with the hallucinogenic drug PCP before what detectives believe was an intentional attack, a court heard.

The has been charged with murder and multiple counts of attempted murder, in connection with incident which claimed the life of an 18-year-old girl and injured 22 other people at the New York tourist hotspot.

“He murdered in cold blood,” said assistant district attorney Harrison Schweiloch.

Video shows wrecked car that drove into pedestrians in Times Square

Rojas, wearing the same red T-shirt and jeans he was photographed in a day earlier, appeared subdued. He did not enter a plea and was held without bail.

His lawyer, Enrico Demarco, had no comment, while family and friends who attended the hearing cried outside court and did not speak to reporters.

Rojas, who lived with his mother in the Bronx, drove his car from his home to Manhattan, then made a U-turn in Times Square.

He steered his car onto a pavement and ploughed through helpless tourists for three blocks before crashing into protective barriers.

Alyssa Elsman, of Portage, Michigan, was killed. Her 13-year-old sister was among the injured.

A friend of Miss Elsman said her family went on a trip to New York each year.

Olivia Lemke said: “She was just selfless. She always wanted to make people happy. That’s all she ever cared about."

Three people were still in critical condition with serious head injuries on Friday and a fourth was being treated for a collapsed lung and broken pelvis.

Richard Rojas appeared in court charged with murder and attempted murder on Friday (AP)

Photographers snapped pictures of a wild-eyed Rojas after he climbed from the wrecked car and ran through the street waving his arms. A group that included a security supervisor at a nearby Planet Hollywood restaurant tackled him.

After he was detained, he said he wanted to “kill them all” and police should have shot him to stop him, a prosecutor told the court.

Rojas “had glassy eyes, slurred speech, and was unsteady,” during his arrest, the criminal complaint said. Officials are awaiting toxicology results.

PCP, or phencyclidine, can cause users to become delusional, violent or suicidal, according to the US National Drug Intelligence Centre.

​Rojas enlisted in the Navy in 2011 and served for part of 2012 aboard the USS Carney, a destroyer. He spent his final months in the Navy at the naval air station in Jacksonville, Florida.

In 2012, he was arrested and accused of beating a cab driver who he claimed had disrespected him by trying to charge too much, according to the arrest report.

The arresting officer said Rojas screamed, “my life is over” as he was being detained.

Alyssa Elsman, 18, was killed by Rojas's car (Facebook)

After his arrest, Rojas told the officer he was going to kill all police and military police he saw following his release from jail, the Jacksonville sheriff’s office report stated.

Alan Ceballos, an attorney who represented Rojas in that case, said the state charges were dropped after the military stepped in to take jurisdiction over the criminal case.

Navy records show that in 2013 Rojas spent two months at a naval prison in Charleston, South Carolina. He was discharged in 2014 as the result of a special court martial, a Navy official said.