ELIZABETH, N.J. (Reuters) - The man accused of last month’s bombings in New York and New Jersey that injured dozens of people made his first court appearance on Thursday from a hospital bed, pleading not guilty to attempting to murder police officers.

Ahmad Khan Rahimi, 28, whose last name had previously been reported as Rahami, appeared via live video on a television screen in a courtroom in Elizabeth, New Jersey, from the hospital where he has been recovering from gunshot wounds suffered during a shootout with police.

With his court-appointed lawyer, Peter Liguori, standing bedside in hospital scrubs, Rahimi lay still with a blanket pulled up to his neck during the hearing.

Rahimi, said by U.S. authorities to have been inspired by radial jihadism, spoke in a quiet voice, answering “yes” to several questions from Union County Superior Court Judge Regina Caulfield about whether he understood the charges and wished Liguori to represent him.

Liguori told the judge that his client’s last name was spelled “Rahimi.”

The hearing, which lasted only a few minutes, concerned state charges against him stemming from a gunfight with police on Sept. 19, after an officer discovered him sleeping in the doorway of a bar.

Rahimi, a U.S. citizen born in Afghanistan, is also facing federal charges of using weapons of mass destruction and bombing a place of public use in New York and New Jersey.

Slideshow ( 5 images )

He is accused of setting off an explosive in Manhattan’s Chelsea neighborhood that injured 31 people as well as a pipe bomb near a charity running race in a New Jersey shore town on Sept. 17.

In addition, Rahimi is charged with planting another pressure-cooker bomb in Chelsea that did not go off and with leaving several devices at a train station in Elizabeth, just blocks from the courthouse where he appeared on video on Thursday.

One of those explosives detonated when a bomb squad robot attempted to defuse it. None of the blasts killed anyone.

It remains unclear when Rahimi will appear in federal court, but it is likely he will face charges there before New Jersey’s state case proceeds to trial.

The hearing had been delayed while Rahimi, who was unconscious for weeks, recovered from his injuries. Two officers suffered injuries in the shootout, and at least one of them attended the hearing on Thursday.