WASHINGTON — When Pakistani security officers raided a house outside Karachi in late January, they had no idea that they had just made their most important capture in years.

American intelligence agencies had intercepted communications saying militants with a possible link to the Afghan Taliban’s top military commander, Mullah Abdul Ghani Baradar, were meeting. Tipped off by the Americans, Pakistani counterterrorist officers took several men into custody, meeting no resistance.

Only after a careful process of identification did Pakistani and American officials realize they had captured Mullah Baradar himself, the man who had long overseen the Taliban insurgency against American, NATO and Afghan troops in Afghanistan.

New details of the raid indicate that the arrest of the No. 2 Taliban leader was not necessarily the result of a new determination by Pakistan to go after the Taliban, or a bid to improve its strategic position in the region. Rather, it may be something more prosaic: “a lucky accident,” as one American official called it. “No one knew what they were getting,” he said.