A Muslim student who had spent four years in the US on an academic scholarship from Saudi Arabia was sentenced to life in prison on Tuesday for attempting to assemble an improvised explosive device.

The bomb, prosecutors said, was meant as a means to wage jihad against the US government and its citizens on American soil. According to a journal seized by federal agents, he sought the scholarship to facilitate his travel to the United States and help him fund the attacks.

The student, Khalid Aldawsari, was convicted in June after a federal trial in Amarillo, Texas. Until his arrest in February 2011, Mr. Aldawsari was a business student at South Plains College, near Lubbock, Texas. He had also studied chemical engineering at Texas Tech.

“I excelled in my studies in high school in order to take advantage of an opportunity for a scholarship to America,” Aldawsari wrote in his journal.

He said he applied for a particular scholarship because its recipients were sent immediately to the US and were given the largest amount of financial assistance, “which will help tremendously in providing me with the support I need for Jihad, God willing.”

The journal continues: “And now, after mastering the English language, learning how to build explosives, and continuous planning to target the infidel Americans, it is time for Jihad.”

Aldawsari first came under suspicion in February 2011 when he ordered 10 bottles of concentrated phenol from a chemical company in North Carolina. The company became suspicious when the buyer was unable to provide a business or university address for delivery of the chemicals.

He later canceled the order. By then, agents of the Federal Bureau of Investigation had opened an inquiry.

What they found is that Aldawsari had been conducting research on the Internet and had downloaded a bombmaking recipe for trinitrophenol, or TNP.

In addition to phenol, the key ingredients for TNP are nitric acid and concentrated sulfuric acid. The agents confirmed that Aldawsari had already purchased 30 liters of nitric acid and three gallons of sulfuric acid.

That was more than enough to produce a bomb, explosives experts said.

During a search of his apartment, agents found a chemical set, flasks, a hazmat suit, a soldering kit, a battery tester, alarm clocks, and a stun gun. They said it appeared he’d purchased a strand of Christmas tree lights to wire a detonator.

According to court documents, Aldawsari used the Internet to obtain instructions to mix the chemicals into an explosive, as well as instructions to modify a cellphone into a remote detonation device.

One e-mail offered a simplified lesson in how to booby-trap a vehicle with common household materials. The lesson, the e-mail said in part, was directed especially to the brothers in America and Europe. It noted that “one operation in the land of infidels is equal to ten operations against occupying forces in the land of the Muslims.”

Agents also discovered that Aldawsari had sent himself e-mails listing potential targets for his planned attacks.

An e-mail entitled “NICE TARGETS 01” listed 12 reservoirs and dams in Colorado and California. Agents also found information about three US citizens who had served in the military at Iraq’s Abu Ghraib prison. And there were indications he was considering a rush-hour attack in New York City.

Agents also found an e-mail message with the Dallas address of former President George W. Bush. The e-mail was titled: “Tyrant’s House.”

In a disguised Web posting in March 2010, Aldawsari expressed his desire to become a martyr for Islam. “You who created mankind and who is knowledgeable of what is in the womb, grant me martyrdom for Your sake and make Jihad easy for me only in Your path,” he wrote under the blog name “fromfaraway90.”

Federal prosecutors said the key to the Aldawsari case was the role played by alert citizens who contacted officials to investigate suspicious activities.

“Khalid Aldawsari, acting as a lone wolf, may well have gone undetected were it not for the keen observations of private citizens,” Sarah Saldaña, US attorney for the Northern District of Texas, said in a statement.

“This case serves as a reminder to all private citizens that we must always be observant and vigilant, as there are some who intend to cause great harm,” Ms. Saldaña said.