WASHINGTON — The tip that led to the FBI's subway bombing sting came from a source in the Muslim community: A Pakistani-born man from a middle-class suburb was trying to join a terrorist group, law enforcement officials said Thursday.

Farooque Ahmed, a naturalized citizen arrested Wednesday, was a married father who had a good job with a telecommunications company. Authorities say he also was eager to kill Americans in Afghanistan and committed to becoming a martyr.

Ahmed thought he had found what he wanted, a pair of al-Qaida operatives who would help him carry out an attack on the nation's second-busiest subway, according to court documents unsealed Thursday. But the operatives were really undercover investigators whose meetings at a local hotel room were all staged with the FBI's cameras rolling, law enforcement officials said, speaking on condition of anonymity because the investigation continues.

What followed was an elaborate ruse in which Ahmed was given intelligence-gathering duties and coded information in a Quran by two individuals posing as al-Qaida operatives as part of the supposed plot to kill commuters.

Ahmed, 34, was taped discussing his firearm, martial arts and knife skills and offering to teach those deadly tactics to others, according to an FBI affidavit. Officials said they took guns and ammunition out of Ahmed's suburban Ashburn, Va., town house during a search Wednesday.

Philip Seymour Hoffman withdrew a total of $1,200 from an ATM at a supermarket near his New York City apartment the night before he was found lifeless in his bathroom with a syringe still in his left arm, sources told NBC News.

Ahmed was arrested just weeks before, the FBI says, he planned to make the annual religious pilgrimage to the Islamic holy city of Mecca in Saudi Arabia. The case represents the latest in a recent string of would-be terrorist attacks that officials say were aided, hatched or carried out by U.S. citizens.

Like the accused gunman in the deadly Fort Hood, Texas, shooting and the convicted terrorist who tried to detonate a car bomb in New York City's Times Square, officials said they believe Ahmed was radicalized inside the U.S. But they do not yet know what sent him down that path.

Like many would-be terrorists and sympathizers, Ahmed was potentially influenced by Anwar al-Awlaki, the radical Muslim cleric who preached in northern Virginia until 2002 and now lives in hiding in Yemen, officials said. But while Ahmed listened to al-Awlaki's Internet sermons, officials said the two were not in contact and they're not sure how influential those sermons were.

Born in Lahore, Pakistan, Ahmed arrived in the U.S. in 1993 and became a citizen in 2005, officials said. He worshipped at the All Dulles Area Muslim Society, which is known for its mainstream Islamic congregation. Leaders there have decried violence and were quick to call for Ahmed's prosecution. He was not a member of the society, said board member Robert Marro.

"He comes in just for prayer services and then leaves right after," Marro said.

AP

Photo released by the Justice Department of Farooque Ahmed

Ahmed was a contractor with the telecommunications company Ericsson Services Inc. Company spokeswoman Kathy Egan said he never worked on the company's government contracts, including ones with the Pentagon. Ahmed never had access to classified information, Egan said.

In court documents, FBI agent Charles A. Dayoub said Ahmed was lured by an e-mail to his first meeting with a supposed al-Qaida liaison. At the April 18 meeting, in the lobby of a hotel near Washington Dulles International Airport, Ahmed accepted a Quran containing coded documents for the locations of future meetings, Dayoub wrote.

It was all a setup. Ahmed took eagerly to his assignments, court documents said. He videotaped four northern Virginia subway stations, suggested using rolling suitcases instead of backpacks to pack the explosives and said he wanted to donate $10,000 to help the overseas fight.

Dayoub said Ahmed had an associate who also tried to join a terrorist group and accompanied Ahmed while he conducted surveillance of subway systems. The associate is not suspected of wrongdoing, officials said, indicating he was cooperating with investigators all along.

Justice Department spokesman Dean Boyd would provide no details on the associate's identity or the identity of the original tipster. Since the terrorist attacks of Sept. 11, 2001, the FBI has made outreach to Muslim communities a priority and has encouraged people who see radical behavior to contact authorities.

The FBI and White House have said the public was never in danger because FBI agents had Ahmed under tight surveillance before the sting was begun and until his arrest.

Ahmed faces charges of attempting to provide material support to a designated foreign terrorist organization, collecting information to assist in planning a terrorist attack on a transit facility, and attempting to provide material support to terrorists. He is due in court Friday, when prosecutors will argue he is too dangerous to be released while awaiting trial.

The agents who searched Ahmed's house were looking for computers, associated equipment, software and instruction manuals for the equipment, according to the warrant application which was unsealed with Dayoub's affidavit. They also applied to seize Ahmed's 2005 Honda Accord and all assets in his bank account.

Investigators are now focused on what turned Ahmed against the country he has lived in for 17 years and he swore an allegiance to. He has not been back to Pakistan since 2005 and authorities do not believe he received any terrorism training or was operating at the behest of any terrorist group.

Neighbor Margaret Petney said Ahmed moved in his Ashburn, Va., town house about a year and a half ago with his wife and young child, and that they wore traditional Muslim clothing.

Ahmed's wife, Sahar, joined the Hip Muslim Moms, a support group for women with children under 5 years old, and brought her young son to play dates with other mothers, said group organizer Esraa Bani. She had moved to the area and was looking for a mothers' group when she joined. She was very quiet and kept to herself.

Petney observed that "they didn't seem to be too friendly with anybody."

———

Associated Press writers Eileen Sullivan and Sarah Brumfield in Washington, Brett Zongker in Arlington, Va., Kathleen Miller in Reston, Va., Kasey Jones and Ben Nuckols in Baltimore and AP researcher Barbara Sambriski in New York contributed to this report.

Copyright 2010 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.