During nearly every meeting over the years between Pakistani military and intelligence chiefs and their American counterparts, the Pakistanis were “read the riot act”—a phrase that recurs with striking frequency in descriptions of these meetings. Each time, the Pakistanis denied everything. In one meeting several years ago, American intelligence officials asked Pakistani leaders to shut down the so-called Quetta Shura, the ruling council of those Taliban members associated with the former Afghan leader Mullah Muhammad Omar. Quetta is the capital of the Pakistani province of Baluchistan, and the Quetta Shura, according to numerous accounts, had its headquarters not far from a Pakistani army division headquarters there. But General Kayani, who was then the head of the ISI, looked puzzled, and “acted like he’d never heard of the Quetta Shura,” according to a source who was briefed on the meeting.

In 2008 Mike McConnell, who was then President Bush’s director of national intelligence, confronted the ISI chief, General Ahmed Shuja Pasha, with evidence that the ISI was tipping off jihadists so that they could escape in advance of American attacks against them. According to sources familiar with the conversation, McConnell accused Pakistan of not doing everything it could to rein in the Pakistani Taliban; he asserted that American intelligence had concluded that most Pakistani assets were still deployed against India. “How dare you tell me how our forces are deployed?,” Pasha said to McConnell. McConnell then provided Pasha with evidence to back up his assertion.

Meanwhile American generals, briefing Congress and officials of the Bush and Obama administrations, gave repeated assurances that they had developed the sort of personal relationships with Pakistani military leaders that would lead to a more productive alliance. Admiral Michael Mullen, who stepped down as chairman of the Joint Chiefs of Staff in late September, invested a great deal of time in his relationship with General Kayani. But eventually Mullen’s patience was exhausted; days before his retirement, Mullen finally broke with Kayani, publicly accusing the Pakistani army of supporting America’s enemies in Afghanistan. In his final appearance before the Senate Armed Services Committee, on September 22, Mullen said that ISI-supported operatives of the Haqqani network had conducted a recent attack on the American Embassy in Kabul. “The Haqqani network acts as a veritable arm of Pakistan’s Inter-Services Intelligence agency,” he said.

After Mullen’s explosive testimony, the Obama administration made only a desultory attempt to walk back his statement, and there are indications that the administration had already been recalibrating the way it deals with Pakistani dissembling. In April, General Pasha, the head of the ISI, visited Leon Panetta, who was then the director of the CIA, at the agency’s headquarters outside Washington. According to a source who was briefed on the meeting, Panetta upheld an American tradition: he “read Pasha the riot act.” The message conveyed by Panetta to Pasha and the ISI was: “If you don’t stop your relations with the Haqqani network in particular, but also other groups, the U.S. will be forced to rethink its entire relationship with the Pakistani military.”

Several factors may have contributed to Mullen’s decisive break. The September 13 raid on the American Embassy and NATO headquarters in Kabul—in which Haqqani insurgents besieged the compound with guns and rocket-propelled grenades, killing at least 16 people—had shocked the Joint Chiefs. Ryan Crocker, the American ambassador to Afghanistan, “had to spend 18 hours in a bunker to keep himself alive,” this source said. “Imagine what would have happened had he been killed.”

Admiral Mullen had been even more shocked by the murder last May of Saleem Shahzad, a Pakistani journalist. Shahzad, who maintained close contact with various jihadist leaders, had angered ISI leaders with his reporting, according to The New Yorker. Not long after the killing, Admiral Mullen took the unprecedented step of stating publicly that Shahzad’s death had been “sanctioned by the government” of Pakistan. “I have not seen anything to disabuse the report that the government knew about this,” he said. In fact, he had seen reliable intelligence proving that the top leaders of the Pakistani army and ISI had ordered the murder. The New Yorker reported that the order to kill Shahzad came from an officer on General Kayani’s staff. Sources we spoke with say the order was passed directly to General Pasha, the head of the ISI. According to one of the sources, an official with knowledge of the intelligence, Pasha was told to “deal with it” and “take care of the problem.” According to this source, Mullen was horrified that his Pakistani interlocutors of many years had been involved in orchestrating the killing of a journalist. “It struck a visceral chord with him,” the source told The Atlantic, recalling that Mullen had slammed his desk and said, “This is old school.”