(CNN) -- Trevor Bickford, the 19-year-old accused of attacking New York Police Department officers with a machete on New Year's Eve, traveled to the city "in order to kill people and carry out jihad," prosecutors say.

The three injured NYPD officers were in stable condition, according to the NYPD commissioner.

Speaking at Bickford's arraignment Wednesday, prosecutors said the suspect tried to grab a gun from an NYPD officer during the attack, but couldn't get it out of the holster.

"The defendant admitted that he purposefully waited until he saw a moment when the officer was isolated and not near any civilian when he could attack him," prosecutor Lucy Nicholas said in court.

According to the suspect, all government officials were his target because in the suspect's mind, they "cannot be proper Muslims because the United States government supports Israel," prosecutors said.

Bickford appeared via video feed from his hospital bed at Bellevue Hospital.

He was formally charged with three counts of attempted murder in the first degree, one count of assault in the first degree, two counts of attempted assault in the first degree and three counts of assault in the second degree.

Bickford was remanded back into custody. No plea was entered.

The-CNN-Wire
™ & © 2023 Cable News Network, Inc., a Warner Bros. Discovery Company. All rights reserved.