The man accused of detonating a crude bomb in Chelsea last year, injuring dozens of people, was initially ejected from the courtroom Monday as opening arguments began in his trial.

Just minutes into the trial, the defendant stood and insisted on addressing the court, despite warnings from the judge not to.

When Rahimi would not back down, Federal Judge Richard Berman ejected him from the courtroom.

Rahimi later was allowed to return, and he apologized, saying he only wanted to ask why his family is not being allowed to visit him in jail.

Prosecutors say he was inspired by Osama bin Laden and ISIS, arguing "The defendant believed he was a soldier in a holy war against Americans."

During their opening arguments, prosecutors said Rahimi purchased the materials online and made the bombs himself.

They said surveillance video shows him hauling the bombs to Chelsea, and forensic analysis detected his fingerprints and DNA on the cellphone detonator and other evidence.

Rahimi's public defender gave a brief opening statement, reminding the jury that the prosecution must prove the charges beyond a reasonable doubt.

The Chelsea blast blew out windows and sent people running for their lives. The prosecution's first witness testified that was she just steps from returning to her West 23rd St. apartment when she heard a deafening sound, saw a blinding light, and was knocked to the ground.

She recalled injuring her knees and not being able to see. When she asked a medical worker if her eye was still there, the worker hesitated before saying "yes." That same worker then added: "Do you believe in God?"

When she responded, "yes," the medical attendant said, "pray." She said a bomb fragment stopped just short of an eyeball, but her vision eventually recovered.

31 people were injured last year when a bomb went off on 23rd St. between Sixth and Seventh Avenues.

A second device, which never went off, was placed four blocks north, and another exploded in New Jersey, but no one was injured.

Ahmad Rahimi was arrested days later after a shootout with police.

Prosecutors have connected him to all three bombs.

Rahimi has pleaded not guilty to all charges.

The trial is expected to last at least two weeks. If convicted, Rahimi faces life in prison.

Sketch above by Shirley Shepard.