Updated

Shoeless, his hands shackled behind his back, a man accused of a deadly shooting spree involving people in red cars was arraigned Tuesday in the prison unit of the hospital where he has been held for evaluation.

Matthew Colletta was arraigned on charges including murder, assault, reckless endangerment, and criminal possession of a weapon and controlled substances in the conference room of the prison unit at Bellevue Hospital Center in Manhattan, where he was transferred over the weekend.

Colletta's attorney entered a not guilty plea for him. A judge agreed to the attorney's request to give Colletta a mental competency exam.

Authorities have accused Colletta, 34, of a series of drive-by shootings that took place in the Queens borough of New York City over six hours on Friday. Although police said the choice of victims appeared random, the last five shootings targeted red automobiles.

Caught in the gunfire was Todd Upton, a 51-year-old United Parcel Service driver, who died after being shot in the neck. He and his wife had just dropped their daughter off at Marist College in Poughkeepsie, New York.

Click here for FOXNews.com's Crime Center

Two other men suffered gunshot wounds, while two people were hit by flying glass from their windshields.

During Tuesday's brief proceeding, Queens Assistant District Attorney Charissa Ilardi read several statements she said Colletta made following his arrest.

In one, Colletta told a police officer he had valet-parked his car and "someone must have put that gun there. I don't have a gun. It's not mine."

Colletta also told officers he had "'borrowed the gun from Lucifer"' and he found it in a container and had obtained bullets from a friend.

Authorities say they recovered a loaded 9mm handgun when they arrested him and a .22-caliber revolver from the car he was driving.

Colletta also told officers he had ingested cocaine and eight bags of angel dust and had drunk a glass of red wine at a church.

According to court papers, Colletta said he shot at cars, including red vans, to stop them from coming after him.

Colletta's attorney, Todd Greenberg, said the statements, if true, "sound like a person under delusions and suffering a psychotic episode."

Greenberg has described Colletta as having a long history of mental illness and said his client has been diagnosed as a paranoid schizophrenic. He said his client has been in and out of psychiatric hospitals, as recently as 2000, since he was 18.

"We're dealing with a person who is seriously ill, and it will figure into his defense," Greenberg said following the arraignment.

Greenberg said he "had to tell" Colletta about the crimes.

"He's very remorseful when I tell him," Greenberg said. "Although I don't think he understands what he did."

Judge Fernando Camacho agreed to Greenberg's request that his client be given a mental competency exam to see if he is fit to stand trial. The judge said he wanted to see the exam results within three weeks.

A grand jury will begin hearing the case on Thursday. Colletta will not testify to the grand jury, Greenberg said.

During the arraignment, Colletta mostly looked down at a table. Afterward, a longtime friend of Colletta's, Jason Perry, who attended the arraignment, insisted his friend was a "gentle man."

"Between being medicated and the psychological state that he's in, he was not the Matthew Colletta I know," Perry said.