The search for links between the suspected Times Square bomber and various militant groups in Pakistan led investigators to the sprawling, marble-floored Bathha Mosque and religious school in a northern suburb of Karachi.
US and Pakistani authorities are trying to trace the movements of the suspect, Faisal Shahzad, during his recent five-month stay in Pakistan. They are seeking to establish whether he connected with any of the myriad Islamic terrorist groups and received instructions, funding or training.
Shahzad faces terrorism and weapons charges in New York after authorities said he admitted rigging a sport utility vehicle with a crude bomb of firecrackers, propane and gasoline based on explosives training he received in Pakistan.
US authorities said they have yet to establish a firm link between Shahzad and an extremist group.
Early morning prayers had just finished on Tuesday when authorities detained Mohammed Rehan as he left the Bathha Mosque.
The compound surrounded by 10-foot (three-meter) walls concealing a multistoried madrassa is run by the militant group, Jaish-e-Mohammed, which is affiliated with Al-Qaeda.
"They arrested him after dawn prayers at the corner. They were waiting," said Alamgir, a witness who spoke to The Associated Press outside the mosque.
Another security official told the AP that Masood Azhar, the leader of Jaish-e-Mohammed, had come first to the Bathha mosque after being freed from an Indian jail in 1999 in exchange for an Indian Airlines plane hijacked to southern Afghanistan, where the Taliban were then headquartered.
Three other people, also with suspected ties to Jaish-e-Mohammed, were picked up elsewhere in this teeming port city of 16 million people, according to Pakistani officials who spoke on condition they not be identified because they were not authorised to release information to the media.
One official said the men were being held at a "safe house" in Karachi where they were being interrogated by both US and Pakistani officials. A second official also said the United States was involved in the interrogation.
Pakistan and the US are close if sometimes uneasy allies, and CIA officials have been known to question Al-Qaeda and other terrorist suspects.
"It's an open secret that the FBI and CIA has a direct line to Pakistani intelligence," said one senior Pakistani security official who spoke on condition of anonymity because he did not have permission to speak to the media.