ELIZABETH, N.J. — Ahmad Khan Rahimi, accused of setting off bombs last month in New York and New Jersey and injuring more than 30 people, pleaded not guilty Thursday.

Rahimi, who has been charged with attempted murder and handgun offenses, remains hospitalized after police shot him during a gun battle in Linden, N.J. He appeared in Union County Superior Court here via teleconference.

It was Rahimi’s first court appearance since being captured Sept. 19 after a gun battle with police outside a bar. He is charged with the attempted murder of five police officers and illegal possession and use of handgun.

His lawyer, Peter Liguori started off the proceeding by correcting his client’s name. Rahimi’s name has been reported as being spelled Rahami.

Rahimi spoke in a squeaky whisper from his hospital room, where he has been since he was injured in the shootout. In response to questions posed to him from Judge Regina Caufield, he answered yes three times to questions about understanding his rights and confirming his address.

Rahimi, a 28-year-old Afghan-born U.S. citizen, was covered in a white blanket and dressed in a green hospital gown. He was propped up on his bed with two pillows and his neck appeared to be bandaged.

Authorities have declined to provide details on Rahimi's medical condition, citing privacy laws. Rahimi was shot “multiple times” as officers apprehended him. Two officers were injured.

Police sought Rahimi after investigators lifted a fingerprint from a pressure cooker bomb that he left in the Chelsea neighborhood of Manhattan that failed to detonate.

The morning of the shootout, bombs were discovered in a trash can near the Elizabeth train station. Police accidentally detonated one of the bombs with a robot as they were attempting to recover them.

Rahimi’s bail will remain at $5.2 million.