Lubbock, Texas: Twice in the days leading up to Khalid Ali-M Al Dawsari's arrest federal agents secretly searched the Saudi man's West Texas apartment, where they say they found bomb-making chemicals as well as beakers, flasks, wiring, a hazmat suit and clocks.

They also discovered Aldawsari's journal, handwritten in Arabic, in which he wrote that he had been planning a terror attack in the U.S. for years and that it was "time for jihad," or holy war, court documents show.

Al Dawsari wrote that he was planning an attack in the U.S. for years, even before coming to America on a scholarship. He bemoaned the plight of Muslims and said he was influenced by Osama Bin Laden's speeches.

Jury selection in the 22-year-old's trial was set to begin Thursday in Amarillo. If convicted, Al Dawsari faces up to life in prison.

Bomb

The results of the two searches in at Aldawsari's apartment in Lubbock in February 2011 led authorities to suspect he had nearly everything he needed to build a bomb, having purchased chemicals and other materials online in previous months.

He had also researched targets — including dams, nuclear plants or the Dallas home of former President George W. Bush — and how to place bomb material inside dolls and baby carriages, court records show.

Authorities arrested the former Texas Tech University chemical engineering student on February 23, 2011, and charged him with attempted use of a weapon of mass destruction.

He has pleaded not guilty, and attorneys plan to use an insanity defense, court records show.

A judge assigned to the case earlier this year, U.S. District Judge Donald E. Walter from Louisiana, moved the trial from Lubbock but did not indicate why. Dick Baker, an assistant U.S. attorney in the case, declined to comment, as did one of Aldawsari's attorneys, Paul Doyle.

Gag order

The previous judge, who recused himself in April for reasons not disclosed publicly, placed a gag order on the case shortly after Al Dawsari's arrest.

Prosecutors have shown some of the evidence they could present through rulings made by Walter following objections to video exhibits from Al Dawsari's attorneys, according to court documents.

Last week, Walter ruled prosecutors can use footage of videos found on Aldawsari's computer, including one in which Ayman Al Zawahri, Al Qaida's current leader, praises as martyrs the deaths of two unspecified individuals killed by "American Crusaders," and two other videos that taught how to prepare picric acid and how to use a cellphone as a remote detonator.

However, the judge excluded a video containing an image of Osama Bin Laden and audio believed to be a speech given by the slain former leader of Al Qaida and another file on that video that has graphic images of war that seem to focus on Palestinian-Israeli conflict, according to court documents.

But Walter wrote that prosecutors could present it at trial and explain its relevance to him while jurors are out of the courtroom, documents show.

Al Dawsari's attorneys said in court documents that the video "rolls everything that is unfairly prejudicial about the other videos into one." The also said in the document that Al Dawsari had no contact with any terrorists.

TNP, the chemical explosive that Aldawsari was suspected of trying to make, has about the same destructive power as TNT. FBI bomb experts said the amounts in the Al Dawsari case would have yielded almost 15 pounds of explosive — about the same amount used per bomb in the London subway attacks that killed scores of people in July 2005.

Authorities say they were tipped to Al Dawsari's online purchases by chemical company Carolina Biological Supply of Burlington, N.C., and shipping company Con-way Freight on Feb. 1, 2011. The chemical company reported a $435 suspicious purchase to the FBI, while the shipping company notified Lubbock police and the FBI because it appeared the order wasn't intended for commercial use.

Within weeks, federal agents had traced Aldawsari's other online purchases, discovered extremist posts he made on the Internet and secretly searched his off-campus apartment, computer and email accounts and read his diary, according to court records

Al Dawsari came to the U.S. in October 2008 from Riyadh, Saudi Arabia, to study chemical engineering at Texas Tech. He transferred in early 2011 to nearby South Plains College, where he was studying business.

A Saudi industrial company, which was not identified in court documents, was paying his tuition and living expenses.