This was an accident waiting to happen. The deadly skirmish on the Afghan border involving U.S. special forces and Pakistani soldiers, which left 24 Pakistanis dead from a NATO air strike, reflects the contradiction at the heart of U.S. policy regarding Pakistan.

With the Afghanistan drawdown looming, the escalated U.S. military operation targeting the Taliban is out of step with U.S. diplomacy, which is looking for a negotiated solution. 

There you have it. So while U.S. diplomats back Afghan President Hamid Karzai’s decision to talk to the Taliban, the U.S. military is busy killing the people with whom he is supposed to negotiate, as well as angering the neighbor with a justifiable stake in Afghanistan’s future stability.

The assassination of Osama bin Laden by U.S. elite troops deep inside Pakistan drew howls of protest against the violation of Pakistani sovereignty. The escalation of drone attacks in the border areas has  fueled anti-Americanism and raised political pressure on Pakistan’s weak coalition government. Now, once again, the all-powerful military has been humiliated.

Whatever the circumstances of Saturday’s killings, and whether or not it was a case of mistaken identity — there are two NATO investigations under way and another by U.S. Central Command — the fact remains that the U.S. and Pakistan still need each other.

Having blocked a NATO land supply route across the border, Pakistan says it will boycott next week’s international conference in Bonn on the future of Afghanistan.

Washington has tried everything, from financial incentives to megaphone diplomacy, in a vain — and pointless — attempt to persuade the Pakistani military to change course strategically and end its support for the Taliban insurgents who are killing American soldiers.

There are many contributing factors in the crisis between the two countries, but in recent years the U.S., at least publicly, has failed to understand Pakistan’s strategic interests.

The Obama administration has already shown signs of contrition after the latest killings. There is an urgent need for better coordination of U.S. strategy to prevent a future disaster in relations with a nuclear-armed state in the most unstable region of the world. America’s relations with Pakistan are quite simply too big to fail.