The armed assault on Sri Lanka's cricket team in Lahore has been a brutal demonstration, if any more were needed, that the war on terror is devouring itself and the states that have been sucked into its slipstream. Pakistan is both victim and protagonist of the conflict in Afghanistan, its western and northern fringes devastated by a US-driven counter-insurgency campaign, its heartlands wracked by growing violence and deepening poverty. The country now shows every sign of slipping out of the control of its dysfunctional civilian government - and even the military that has held it together for 60 years.
Presumably, that was part of the intended message of the group that carried out Tuesday's terror spectacle. But the outrage also fits into a well-established pattern of attacks carried out in revenge for the army's devastation of the tribal areas on the Afghan border, where thousands have been killed and up to half a million people forced to flee from the fighting with the Pakistani Taliban. Hostility to this onslaught has been inflamed by the recent revelation that US aerial drone attacks on supposed terrorist hideouts have in fact been launched from a base in Pakistan itself, with the secret connivance of president Asif Zardari, as well as across the border from occupied Afghanistan.
Attempts to paint Pakistan's convulsions as a conflict between moderates and extremists obscure the reality that elements of the Pakistani state are operating on both sides, whatever their nominal allegiance. Now that Pakistan faces its own blowback from the Afghan war and the Taliban it helped create, its military intelligence is trying to redirect its wayward offspring back to fight what are supposed to be Pakistan's own US and British allies in Afghanistan on the other side of the border. The Afghan Taliban leader Mullah Omar's call on his Pakistani followers this week to stop attacks on the Pakistani army and join the battle to "liberate Afghanistan from occupation forces" reflects that pressure.
On the face of it, the situation could hardly be more bizarre. But it is only one byproduct of the systematically counterproductive nature of western policy across the wider region since 2001. After seven years of lawless invasion and occupation, the war on terror is everywhere in ruins. The limits of American military power have been laid bare in the killing fields of Iraq; Iran has been transformed into the pre-eminent regional power; Hezbollah and Hamas have become the most important forces in Lebanon and the Palestinian territories; a resurgent Taliban is leading an increasingly effective guerrilla war in Afghanistan; and far from crushing terror networks, the US and its allies have spread them to Pakistan.
Barack Obama's rise to power is a product of that record of failure: without his opposition to the Iraq war he would not be president. And since his inauguration, he has signalled potentially important shifts in US foreign policy, while ditching the rhetoric of the war on terror. Obama's moves to open a dialogue with Syria and Iran, his apparent willingness to trade missile defence in eastern Europe for Russian support on Iran's nuclear programme and his statement about "how the war in Iraq will end" all suggest real movement.
But although the belligerent language has gone, what is striking is the continuity, rather than the breach, with the main elements of George Bush's war on terror. Obama's timetable for withdrawal of troops from Iraq mirrors last November's status of forces agreement between the Bush administration and the Iraqi government, including in his stated "intention" to pull out all troops by the end of 2011. And, as after last year's deal, that was quickly qualified by the continuity US defence secretary, Robert Gates, who said he would like to see a "modest" US military presence stay on thereafter - if the Iraqi government requested it, of course.
Mercifully, Obama's announcement that the occupation of Iraq would continue for at least three more years was accompanied by none of the attempts to whitewash the war offered by Britain's Lieutenant-General John Cooper, who told the Guardian that UK troops would leave Iraq this year "in a better position" - after hundreds of thousands of Iraqis have been killed and four million made refugees. But in the crucible of conflict in the Middle East, between Israel and the Palestinians, there is also little sign as yet of any substantive change in US policy: whether on lifting the continuing siege of Gaza or talking to the Palestinians' elected representatives, let alone using US leverage to bring an end to illegal Israel colonisation of the West Bank or end its occupation.
However, it is in Afghanistan that the new US administration is on the point of compounding, rather than reversing, the failures of the war on terror. Obama has already committed himself to sending 17,000 more US troops, an increase of almost 50%, with the prospect of a similar number again later in the year. He did at least promise escalation in his election campaign, which is more than can be said for British ministers when they despatched thousands of extra troops to Helmand in 2006.
But there is not the remotest prospect that a "surge" of this scale - aimed at propping up a corrupt Afghan administration the US and its allies openly despise - can pacify the country or crush Taliban-led Pashtun resistance - though it will surely boost the civilian death toll, running at more than 2,000 last year. It's also not what Afghans or Americans want, according to opinion polls, and it will certainly increase the destabilisation of an already precarious Pakistan, which will be the sanctuary for even more Taliban fighters as they are harried by American occupation forces.
The grip of conservative Islamism on both sides of the Afghanistan-Pakistan border is the legacy not just of George Bush, of course, but decades of US meddling in the region, and its sponsorship of the anti-Soviet mujahideen in the 1980s in particular. What Obama has inherited from Bush's war on terror is an arc of US and western-backed occupation from Palestine to Pakistan. If the administ-ration's current review of "Afpak" policy were to lead to the negotiations with the Taliban Obama has hinted at and a wind-down of the occupation, that would cut the ground from under Pakistan's own insurgency. But if Afghanistan becomes Obama's war, it risks poisoning his presidency - just as Vietnam did for Lyndon Johnson more than 40 years ago.