The disrupted plan involved Afghan intelligence trying to work with the Pakistan Taliban, allies of Al Qaeda, in order to find a trump card in a baroque regional power game that is likely to intensify after the American withdrawal next year, the officials said. And what started the hard feelings was that the Americans caught them red-handed.

Tipped off to the plan, United States Special Forces raided an Afghan convoy that was ushering a senior Pakistan Taliban militant, Latif Mehsud, to Kabul for secret talks last month, and now have Mr. Mehsud in custody.

Publicly, the Afghan government has described Mr. Mehsud as an insurgent peace emissary. But according to Afghan officials, the ultimate plan was to take revenge on the Pakistani military…

The thinking, Afghan officials said, was that the Afghans could later gain an advantage in negotiations with the Pakistani government by offering to back off their support for the militants.