FILE - In this Dec. 20, 2016 file photo, Ahmad Khan Rahimi, the man accused of setting off bombs in New Jersey and New York's Chelsea neighborhood in September, sits in court in Elizabeth, N.J. His trial opens, Monday, Oct. 2, 2017 in New York. (AP Photo/Mel Evans, File)

FILE - In this Dec. 20, 2016 file photo, Ahmad Khan Rahimi, the man accused of setting off bombs in New Jersey and New York's Chelsea neighborhood in September, sits in court in Elizabeth, N.J. His trial opens, Monday, Oct. 2, 2017 in New York. (AP Photo/Mel Evans, File)

NEW YORK (AP) — A man accused of setting off a pressure cooker bomb in New York City that injured 30 people was a “soldier in a holy war” bent on carrying out a murderous plot with maximum carnage, federal prosecutors said Monday at the start of his trial.

Ahmad Khan Rahimi researched online, bought ingredients and assembled bombs after watching how-to videos, they said.

“He designed it. He built it,” Assistant U.S. Attorney Shawn Crowley said. “He filled it with explosives and deadly shrapnel and he planted it on the street.”

ADVERTISEMENT

Rahimi planted a pipe bomb at a charity race in Seaside Park, New Jersey, that exploded but didn’t injure anyone, prosecutors said. He went back home, then took a train into Manhattan and planted two pressure cooker bombs, they said.

One didn’t go off. The other, hidden near a large trash bin in the busy Chelsea neighborhood, burst at about 8:30 p.m. sending the 100-pound trash bin flying into the air. The blast shattered windows and scattered bits of metal.

Rahimi’s defense attorney, Meghan Gilligan, asked jurors to keep an open mind about the case and said the government would not be able to prove beyond a reasonable doubt that her client is guilty.

“He is at the end of the day a person,” who deserves an open mind from jurors, she said.

Rahimi was briefly removed from the courtroom just as his trial opened Monday.

He interrupted proceedings to speak with U.S. District Court Judge Richard Berman and was escorted out. He returned after the prosecution’s opening statement and apologized for the outburst, telling the judge he hadn’t been able to see his wife since his detention.

“It was not my intention to make a scene,” he told Berman. He said he’s barely seen his three children and hasn’t seen his wife once, because she is not approved to go to the detention facility where he’s held.

“Why are they preventing me from seeing my wife?” he asked the judge. Berman scolded Rahimi for making a scene and for raising the issue “one minute before we were scheduled to start this trial,” but he promised he’d look into the visitation issue.

Rahimi sat down and had no other outbursts as the case progressed.

The 29-year-old who lived with his family in Elizabeth, New Jersey, is not charged with terrorism, but he has been charged with crimes including bombing a public place, using a weapon of mass destruction and interstate transportation of explosives.

ADVERTISEMENT

He was shot by law enforcement during his arrest two days after the attacks. He has pleaded not guilty and is being held without bail.

The bomb that exploded in Chelsea knocked Helena Ayeh, an architect who was headed home, off her feet.

She told jurors Monday that she couldn’t see or hear. She was bleeding heavily, and her knees were bruised. She opened her eyes and an emergency worker told her to shut them immediately. She asked if her eye was still even there.

“And she hesitated, and she said yes,” Ayeh recounted Monday on the witness stand. She said she asked the woman why she hesitated.

Ayeh recalled: “And she said, ‘Do you believe in God?’ I said, ‘Yes.’ She said, ‘Pray.’”

Ayeh said she’d suffered a deep cut in her right eye, and the metal barely missed slicing her eye in half. She said she eventually recovered her vision.

Photographer Jane Schreibman told jurors about calling in the second unexploded pressure cooker. She said she noticed the pot with wires sticking out on the street and a white trash bag near her home. She initially thought it was just a child’s science experiment, she testified. But it nagged at her.

“It was lingering,” she said, so she called 911. The bomb squad showed up and removed the device.

Jurors also saw surveillance footage of Rahimi on the street with bags, and then other later footage of him with fewer bags.

While Rahimi has not been charged with terrorism, prosecutors say his interest in jihad, terrorist attacks and terrorist organizations vastly influenced his plans. They said he was arrested carrying a notebook with writings with such passages as “the sounds of bombs will be heard in the streets.”

Crowley called him a “soldier in a holy war against Americans, and New York and New Jersey were his battle grounds.”

Rahimi also has been charged with attempted murder in New Jersey because authorities say he shot at police officers during his arrest. Details of the shootout won’t be included in the federal trial.