ELIZABETH, N.J. (CBSNewYork/AP) — A man accused of setting off bombs in New Jersey and New York, injuring more than 30 people, was arraigned in court Thursday on charges he tried to kill police officers in New Jersey before they captured him.

See It: Extended Coverage Of The Arrest Of NYC, NJ Bomb Suspect Ahmad Khan Rahimi

READ MORE: Broadway League Says Vaccine Mandate For Children Under 12 Will Take Effect Dec. 14

Ahmad Khan Rahimi’s attorney pleaded not guilty on his behalf to charges of attempted murder of police. Rahimi appeared via video from his hospital bed in Newark.

This is the first time the public saw Rahimi since his arrest, CBS2’s Hazel Sanchez reported.

Rahimi, an Afghan-born U.S. citizen, has been hospitalized with gunshot wounds since a police shootout that led to his capture on Sept. 19 outside a bar in Linden. Authorities have declined to provide details on Rahimi’s medical condition, citing privacy laws.

Sources tell CBS2 that Rahimi, who was shot eight to ten times, just recently had his breathing tube removed and had only been communicating with law enforcement by nodding his head. Rahimi was able to give brief answers to the judge during Thursday’s hearing. 

According to Linden Mayor Derek Armstead,  a bar owner reported someone asleep in doorway of his establishment in Linden om Sept. 19, while police were conducting a wide-scale manhunt for Rahimi. A police officer went to investigate and recognized the suspect, officials said.

Responding police tried to wake up Rahimi.

“At that point, the officer realized that this might be the suspect that was being sought. He then told the person, ‘Show me your hands!’” said Linden Police Capt. James Sarnicki. “At that point, then the suspect went to the side, pulled out a handgun and fired a round at our officer, striking him in the abdomen area. Fortunately, the officer had a bulletproof vest on.”

Linden Police arrested Ahmad Khan Rahami on Sept. 19, 2016 after an intense manhunt. (credit: Twitter.com/BuffingActions)

Linden Police arrested Ahmad Khan Rahimi on Sept. 19, 2016 after an intense manhunt. (credit: Twitter.com/BuffingActions)

Following the shootout, Rahimi was taken into custody and held on more than $5 million bail.

READ MORE: Better.com CEO Vishal Garg Apologizes For Zoom Firing: 'I Blundered The Execution'

Angel Padilla and Peter Hammer, two Linden police officers, were injured in the shootout on Sept. 19. Padilla was the one hit in the vest, while Hammer was struck by bullet fragments.

Linden Police Officers Angel Padilla, Peter Hammer

Linden police Officers Angel Padilla, Peter Hammer were injured in a shootout with bombing suspect Ahmad Khan Rahimi on Monday, Sept. 19, 2016. (Credit: Linden Police)

Both officers were treated and released from the hospital.

Padilla joined several of his law enforcement colleagues to see the man accused of trying to kill him. 

The bust came just two days after police say Rahimi detonated a pipe bomb along the route of a Marine Corps charity race in the New Jersey shore town of Seaside Park and a pressure cooker bomb in New York City on Sept. 17. No one was injured in the New Jersey blast, and 31 people were hurt in the New York blast. A second pressure cooker bomb did not explode.

Rahimi’s public defense attorney, Peter Ligouri, who stood beside him in a hospital gown, asked the court to correct the spelling of his client’s last name, which was first identified as Rahami. The attorney said it is actually Rahimi.

“I would ask the court to enter a not guilty plea on all of them,” Ligouri said.

Rahimi, 28, is charged with five counts of attempted murder of a police officer and weapons offenses.

Rahimi has yet to face federal charges for the bombings. He is still being held on $5.2 million bail.

MORE NEWS: Innovative Gift Card Program With Cash Bonus Aims to Assist Newark Businesses

(TM and © Copyright 2016 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2016 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)