Evidence of one of the most significant homegrown terrorism threats in nearly two decades unfolded Thursday as investigators described an advanced-stage plot to detonate explosives made with beauty-supply chemicals on U.S. soil.

Using information gleaned from intercepted phone calls and e-mails, surveillance footage and receipts from venders, prosecutors drew a picture of Najibullah Zazi, a 24-year-old Afghan man at the center of the scheme, whom they accuse of conspiring with at least three others in the country to deploy weapons of mass destruction in the form of hydrogen peroxide bombs. Zazi, who has permanent legal U.S. residency, was in "urgent" contact with al-Qaeda operatives in Pakistan and had bought and tested a volatile brew of chemicals before heading from his home outside Denver to New York this month, prosecutors said.

The Obama administration moved carefully in confronting its first major terrorism investigation, undergoing what one former senior U.S. official called its "baptism" in managing such a case. Attorney General Eric H. Holder Jr. assured the public that "any imminent threat arising from this case has been disrupted," but teams of FBI agents and members of the New York City police force continued to investigate "a wide range of leads," working round the clock, he said in a statement.

City police and federal agents are on the hunt for more suspects and associates, visiting storage facilities and chemical companies and interviewing members of Afghan immigrant communities in New York, Denver and the Washington area as they search for leads and any stray chemical compounds, according to two law enforcement sources.

Authorities have not yet determined whether Zazi and his confederates detonated explosives in a "test run" as other alleged bombers have done in the past, the sources said. They are turning up the heat on witnesses and possible targets of the investigation to signal that people who come forward and help fill in the missing links will be treated more favorably by law enforcement agencies, they added. The case has prompted national warnings to sports stadium operators and transit authorities, although officials say those are "precautionary" measures.

Law enforcement officials sought to detain Zazi indefinitely on a charge that could send him to prison for life.

The indictment announced Thursday followed two weeks of frenzied law enforcement activity after Zazi traveled from his home to the Flushing neighborhood in Queens, around the anniversary of the Sept. 11, 2001, terrorist strikes.

Zazi was an airport shuttle-bus driver who journeyed to Pakistan in August 2008 for four months of training in weapons and explosives at the hands of operatives with ties to al-Qaeda, investigators wrote in court papers. He returned to the United States in mid-January, quietly preparing to use the skills he had amassed, investigators wrote.

As a U.S. resident, with the freedom to travel under law enforcement radar, Zazi presented the type of threat that officials in the FBI, the Justice Department and intelligence agencies have long warned against.

"Not that I can think of since the first World Trade Center have we had al-Qaeda-trained bombmakers mixing explosives in the United States," said Patrick Rowan, a former chief of the Justice Department's national security division. "It's a really big deal, and I can appreciate that the FBI must be pressing on it."

For the first time since the case became public a week ago, prosecutors in the Eastern District of New York spelled out the evidence they had amassed against Zazi. Notes that authorities discovered in a file on Zazi's computer hard drive describe explosives, including triacetone triperoxide, the chemical used in the 2005 London train bombings. Zazi accessed the document on his laptop in June and July, searching the Internet for "hydrochloric acid" and bookmarking a site on lab safety, prosecutors Jeffrey H. Knox, Berit W. Berger and David Bitkower wrote.

Zazi and three unnamed helpers bought "unusually large quantities" of hydrogen peroxide and acetone products in July and August from beauty shops in and around Aurora, Colo., prosecutors wrote, citing surveillance video and receipts for "Ms. K Liquid 40 Volume" and other products. The aides traveled from New York to Denver to assist Zazi, using stolen credit cards, the Associated Press reported.

On Sept. 6 and 7, authorities say, Zazi rented a suite in a hotel in Aurora, where FBI agents later detected "the presence of acetone . . . in the vent above the stove." The bombmaking instructions mention heating the components to make them "highly concentrated," prosecutors wrote.

On Sept. 9, Zazi rented a car, drove to New York and stayed overnight in a Queens apartment building, where investigators later found backpacks, cellphones, and an electronic scale that FBI agents say could have been used to weigh possible bomb components.

Also Thursday, a well-known New York imam, Ahmad Wais Afzali, 37, appeared in federal district court in Brooklyn, where a magistrate judge set $1.5 million bail allowing for his release under electronic surveillance.

Afzali was overheard on recorded conversations earlier this month allegedly warning Zazi's father about law enforcement interest. New York Police Department intelligence unit officers, who had used the imam as a source in the past, consulted Afzali about the unfolding investigation, setting off a chain of events in which Afzali became a target, accused of lying to authorities.

"The imam did what law enforcement asked him to do," said Afzali's attorney, Ronald Kuby. Zazi's father, Mohammed Wali Zazi, also charged with misleading law enforcement agents in the investigation, has been released and is being monitored electronically.

National security experts said that although much about the case remains unclear, including the possible target of the plot, it is significant.

"This rises to the top in terms of level of concern in the post-9/11 environment, given what appears to be direct connections to al-Qaeda in Pakistan, clear intent to perpetrate an attack and what appears to have been final stages of preparation," said Juan Zarate, who was deputy national security adviser for counterterrorism to President George W. Bush.

Wendy Aiello, a spokeswoman for Zazi attorney Arthur Folsom, said the lawyer "does not have a comment on the indictment at this time."

Staff writer Robin Shulman in New York and staff researcher Julie Tate in Washington contributed to this report.