Ahmad Khan Rahimi in December AP/Mel Evans

In the impending trial for a man accused of planting bombs in New York City and New Jersey, prosecutors will not be able to submit evidence related to the defendant’s alleged shootout with and flight from Linden, New Jersey, police.

But U.S. District Judge Richard Berman of the Southern District of New York said on Tuesday he will allow key pieces of evidence in the case against Ahmad Khan Rahimi that could be favorable to the prosecution against him in New York, including the pipe bombs that he allegedly planted near a charity race in Seaside, New Jersey, and at a train station in Elizabeth, New Jersey.

Berman will also allow prosecutors to admit a notebook found on Rahimi’s person after his arrest containing references to foreign terrorist organizations and figures such as Osama bin Laden and Anwar al-Awlaki.

Rahimi, a U.S. citizen who was born in Afghanistan, is accused of planting two pressure-cooker bombs on the evening of Sept. 17, 2016, in the Chelsea section of Manhattan, of which one detonated and shot a Dumpster 120 feet in the air and injured 30 people.

He has pleaded not guilty to eight counts, which includes use of a weapon of mass destruction.

In June, Berman declined to toss out two explosives charges that could carry mandatory life sentences for Rahimi.

Rahimi also faces six counts in U.S. District Court for the District of New Jersey, which include two counts of attempting to use a weapon of mass destruction. Additionally, he faces attempted murder charges in New Jersey Supreme Court related to the shootout with police.

Prosecutors argued that the New Jersey bombs should be admissible in the New York prosecution because they contain similar components as the bombs used in Chelsea, as well as fingerprint and DNA matches.

“This is a man who had planted bombs—four bombs—some of them packed with shrapnel, designed to murder, maim and injure as many people as possible,” said assistant U.S. attorney Emil Bove III of the U.S. Attorney’s Office for the Southern District of New York at a hearing before Berman.

Berman made the rulings after hearing arguments from Sabrina Shroff of the Federal Defenders of New York, a member of Rahimi’s defense team, who said admitting evidence of the attempted bombings in New Jersey would be prejudicial, noting that the New York indictment made no mention of pipe bombs.

Shroff also disputed the government’s characterization of the admitted notebook as Rahimi’s blueprint for the attacks.

“It’s a very nice story for the government to tell,” Shroff said.

Berman said he will also allow the government to call Aaron Zelin of the Washington Institute, an expert in terrorism and Arab and Islamic politics, as well as the Islamic State and al-Qaida in the Arabian Peninsula and how the groups have encouraged “lone wolf” terrorist attacks.

Assistant U.S. attorneys Shawn Crowley, Andrew DeFilippis and Nicholas Lewin are also prosecuting the case.

In addition to Shroff, Rahimi’s defense team also includes Peggy Cross-Goldenberg, Matthew Larsen and Meghan Gilligan of the Federal Defenders.

Rahimi’s trial in Manhattan federal court is set to begin on Oct. 2.