When 91,000 classified military documents are leaked about a continuing war, there is bound to be controversy. But as one who spent six years in Afghanistan - first as Canada's ambassador, then as deputy head of the United Nations mission there - my first reaction was how true to life it all was. Here is the hall-of-mirrors, see-saw world of counterinsurgency - in all its complexity.
But alarm bells soon started ringing for me. Intelligence sources have been named - a windfall for the Taliban that they are likely toasting. The cost of this betrayal will be measured in lives, undercutting efforts to build trust village-by-village in Kandahar, Helmand and elsewhere.
Look at the sheer scale of the WikiLeaks' material - and its lack of context. In the Afghanistan I knew, civilians were struggling to rebuild an economy and institutions. In the documents, the country is depicted as a howling, naked battlefield. It is a caricature, which will feed prevailing prejudices.
There is, however, at least one genuine insight: dozens of reports tagging the Inter-Services Intelligence (ISI) - the branch of Pakistan's military charged with most aspects of its Afghan policy - as the main driver of the conflict. So long as cross-border interference goes unchecked, prospects for peace remain dim.
By any measure, the conflict is escalating. According to the UN, the number of improvised explosive devices (IEDs) from January to April was twice the 2009 figure. In June alone, 104 foreign soldiers were killed, including four Canadians - the highest monthly toll to date.
In Pakistan, Taliban-led suicide attacks since 2007 have killed an estimated 3,400 - mostly civilians. Thousands more have been killed in operations to root militants out of Swat, Bajaur, Kurram, South Waziristan and elsewhere.
Both Afghanistan and Pakistan are now in the grip of a single escalating conflict, punching eastward from Khyber Pakhtunwa (the former Northwest Frontier Province) into Punjab's heartland, as well as westward toward Kabul, Kandahar and Kunduz.
As a direct consequence, reconciliation has failed to get off the ground: the Pakistan-based Islamic Emirate of Afghanistan - the official name for the Taliban and its allies - clearly prefer to fight.
GENERAL ASHFAQ KAYANI V. THE REST OF THE WORLD
As the War Logs make clear, the principal drivers of violence are no longer, if they ever were, inside Afghanistan.
Consider the following:
First, in February, Pakistan's security forces began arresting a dozen or so Taliban leaders - whose presence on their soil they had always noisily denied - presumably because these insurgent commanders had shown genuine, independent interest in reconciliation.
Second, the chief of Pakistan's army staff, General Ashfaq Kayani, this year once again successfully resisted U.S. pressure to launch military operations in Baluchistan and North Waziristan, where the Islamic Emirate is based.
Third, Gen. Kayani told Mr. Karzai this spring that the condition for peace in Afghanistan would be the closing of several Indian consulates, while offering to broker deals with Islamic Emirate leaders, whom he considers a "strategic asset."
Fourth, Gen. Kayani blithely told a Washington audience that he remained wedded to "strategic depth" - that is, to making Afghanistan the kind of proprietary hinterland for Pakistan, free of Indian or other outside influence, which it was from 1992 to 2001.
This is not empty rhetoric. Gen. Kayani is saying he wants to call the shots in Kabul. To do so, he is prepared to support the principal outfit launching suicide attacks in Afghanistan's cities. He is backing the Islamic Emirate's effort to wreck an Afghan-led nation-building process.
The Pakistan army under Gen. Kayani is sponsoring a large-scale, covert guerrilla war through Afghan proxies - whose strongholds in Baluchistan and Waziristan are flourishing. Their mission in Afghanistan is to keep Pashtun nationalism down, India out and Mr. Karzai weak.
It has nothing to do with Islam, whose principles they trample; indeed, the flower of Afghanistan's ulema (religious leaders) have been among their victims.
Gen. Kayani and others will deny complicity. But as the WikiLeaks material demonstrates, their heavy-handed involvement is now obvious at all levels.
To understand the context of this fraught relationship, read a report called The Sun and the Sky: The Relationship of Pakistan's ISI to Afghan Insurgents, by Matt Waldman, a former Oxfam policy adviser now at Harvard. It is a chilling tale. When the scale of this complicity is fully exposed, it will rank high on the list of modern scandals.
By any measure, Afghan society has recovered smartly since 2001. The latest annual growth in gross domestic product was 22 per cent - despite the global crisis. Government revenue increased by 60 per cent in 18 months. Annual inflation has been minus 12 per cent, as domestic agriculture substituted for pricey imports.
A renaissance has continued in media and culture. Schools, clinics and new rural infrastructure have opened the door to better lives.
Despite thickets of corruption, several Afghan ministries have combined integrity with delivery.
On July 20, 60 donor nations and 12 international organizations met at Kabul to assess progress. The highlight was Hamid Karzai's speech - his best as Afghan President to date.
Leaving aside last year's controversies, he articulated priorities rooted in national consensus.
He returned to the theme of his country as a crossroads and roundabout for Asia, arguing that trade, mineral wealth and sound public finances, wisely pursued, can make Afghanistan's new institutions affordable.
The country has now come full circle - reclaiming the sense of purpose it embraced in 2002-04.
The symbol of this restored strategic impulse is Mr. Karzai's revived collaboration with his outstanding former finance minister (and 2009 presidential rival), Ashraf Ghani. Such political vision has the potential to deliver results.
But larger-scale institution-building will take years.
Afghanistan's army and police were effectively dissolved in 1992; serious efforts to restore them were launched only in 2003 and 2005 respectively.
BOTH COUNTRIES' CITIZENS CAUGHT IN THE MIDDLE
Few Pakistanis rejoice in the ISI's duplicity.
Most see the ISI's strategy for the outrage it is. It has brought their military into disrepute, sullied Pakistan's good name and unleashed unprecedented strife in its streets. Pakistani influence at Kabul is at its lowest ebb since 1947.
The vast majority of Pakistanis do not equate their national interest with the Islamic Emirate of Afghanistan. Indeed, The Dawn, Pakistan's largest daily, warned in an editorial after the Kabul conference against any precipitate U.S. withdrawal from Afghanistan.
Pakistan's army's interference in Afghanistan's recovery violates a key provision of the UN Charter, on non-interference - and at its new scale, it represents a threat to international peace and security. It deserves serious discussion in multilateral forums, including the UN.
Most citizens of both countries want to see the Taliban defeated, and legitimate governments strengthened. The trade deal signed by Afghanistan and Pakistan on July 20 - the first since partition - is a good start.
A similar deal on the border would be historic.
Without Pakistani military support, all signs are the Islamic Emirate's combat units would collapse like a house of cards. Peace and reconciliation would prosper.
So long as this unholy alliance continues, Afghans will continue to succumb to the mistaken view that the U.S. and its allies are deliberately turning a blind eye to Taliban resurgence, despite our sacrifices to date.
Turning the corner on this issue will require a concerted show of will - and much tougher action in the eyes of the new storm of violence in North Waziristan and Baluchistan.
The shrine bombed in Lahore on July 1 holds Ali Bin Usman Hujwiri Ghaznavi, a saint who travelled to the Indus basin from what is now Afghanistan in the 11th century, becoming one of the anchors of Islam in South Asia.
As we begin a second decade of the second millennium, his legacy - one rooted in a rich, tolerant concept of religion; as well as strong relations then between Lahore and Ghazni (Islamabad and Kabul today) - remains worth defending.
For all the damage the WikiLeaks data dump could cause, at least they have brought our attention back to where it should be - to the real obstacles to peace.
Chris Alexander was ambassador of Canada to Afghanistan from 2003 to 2005 and Deputy Special Representative of the UN Secretary-General for Afghanistan from 2005 until 2009. The views expressed in this article are entirely his own. The Long Way Back - his book on Afghanistan's story since 2001 - will be published by HarperCollins in 2011.
Follow us on Twitter: