NEW YORK (Reuters) - A man accused of setting off bombs in New York City and New Jersey last September has failed to persuade a federal judge to keep a notebook that refers to bombs and former al Qaeda leader Osama bin Laden out of his upcoming trial.

FILE PHOTO - Ahmad Khan Rahimi, an Afghan-born U.S. citizen accused of planting bombs in New York and New Jersey, appears in Union County Superior Court for a hearing in Elizabeth, New Jersey, May 15, 2017. REUTERS/Mike Segar

U.S. District Judge Richard Berman in Manhattan ruled at a hearing on Tuesday that the notebook belonging to Ahmad Rahimi, dubbed the “Chelsea Bomber,” could be used as evidence of his motive at his scheduled Oct. 2 trial.

Berman also allowed prosecutors to introduce records of Rahimi’s internet activity and videos of his movements, but barred evidence about a shootout with New Jersey police before his capture, saying it was not relevant to the New York case.

The defendant, an Afghanistan-born U.S. citizen, faces separate criminal charges in New Jersey, including attempted murder and other charges stemming from the shootout with police in Linden, New Jersey.

Rahimi, 29, has been accused of detonating bombs in the Chelsea neighborhood of Manhattan, injuring 30, and the coastal New Jersey town of Seaside Heights, where no one was injured.

Prosecutors have said that Rahimi left behind unexploded bombs in New York and New Jersey before being captured following the shootout.

At Tuesday’s hearing, Berman read from the notebook, which Rahimi’s lawyers said might prejudice jurors at trial.

“Brother Osama bin Laden offered you truce,” one excerpt read. “Inshallah the sounds of bombs will be (he) in the streets. Death to your oppression.”

Berman noted that letters were missing after “he.” “Inshallah” means “god willing.”

Tuesday’s hearing took a bizarre turn after Berman ruled on the evidence, when the judge played a meandering voicemail he received from a woman identifying herself as Ashley.

The woman said she actually set off the bombs, using her “infinity light,” and had also survived the “electrocution chair” and bombed “CIA vaults.”

Berman said he and his clerks had struggled to transcribe the message, and asked prosecutors and Rahimi’s defense lawyers to try.