The Afghan-born man charged with setting off bombs in New Jersey and New York spoke with the FBI for days after his arrest, a prosecutor revealed Thursday as the suspect faced a judge in Manhattan.

ACCUSED NEW YORK, NEW JERSEY BOMBER RAHIMI INDICTED IN FEDERAL COURT

Ahmad Khan Rahimi made statements to the feds over multiple days after his Sept. 19 capture in Linden, N.J., prosecutor Nicholas Lewin said.

Rahimi was still recovering Thursday from multiple bullet wounds suffered in a shootout with police. Officials moved him last week to a federal lockup next to the Manhattan courthouse.

BOMBING SUSPECT MOVED FROM HOSPITAL TO PRISON

Rahimi had trouble standing and walking in court. He was not cuffed or shackled. At one point he had a brief coughing fit and one of his attorneys gave him water.

Rahimi entered a not-guilty plea to the eight-count indictment returned Wednesday. If convicted of all charges, he could face a mandatory life prison sentence.

Lewin told Judge Richard Berman evidence included video of Rahimi before a Sept. 17 bomb wounded 30 people in Manhattan.

The only time Rahimi spoke was when the judge asked him if he wanted to plead not guilty. Rahimi leaned into the microphone on the defense table and said "yes, sir."

"From two busy streets in lower Manhattan, to a race site and commuter train station in New Jersey, it's clear that Rahimi‚Äôs goal was to bring fear and destruction to innocent people going about their Saturday. We set out to find those responsible for these acts of terror, and we are proud to bring this case to justice," FBI Assistant Director in Charge William Sweeney said.

Fox News' Matt Dean, Lissa Kaplan and The Associated Press contributed to this report.