The President of Pakistan, General Pervez Musharraf, flew home with the plaudits of the West still ringing in his ears, but facing the biggest mess a Pakistani leader has had to contend with for many years.
Until Monday night, General Musharraf was the big winner in the latest Afghan war: the shunned military dictator whose quick decision to support the war on terror led first to the removal of sanctions, then to visits from Western leaders including Tony Blair and the US Secretary of State, Colin Powell, and finally to the accolade of addressing a joint session of the Houses of Parliament in London.
The gains remain and are unlikely to be whisked away from under his nose.
But now that Kabul and most other parts of Afghanistan have fallen to the Northern Alliance, they are overshadowed by stark new perils.
The fall of Jalalabad yesterday, 50 miles from the Pakistan border, and American bombing raids on a military base at Khost, only six miles from the border, underline the most immediate new menace: the war is coming closer.
American jets thunder through the skies above Peshawar in Pakistan from morning to night these days. So common a sight have they become that no one casts a glance at them. No longer interested in Kabul and points north, the bombers' focus is ever more tightly on the rugged borderlands, which are the most logical and familiar redoubt for the fleeing Taliban.
Last night Pakistani intelligence sources reported that, once the Northern Alliance's advance was under way, many Taliban leaders sent their families across the border into Pakistan where they would be under the protection of Pashtun tribal leaders. With almost the entire Taliban force now apparently in full flight, the movement's leaders and fighters are themselves said by local sources to be moving in the same direction.
Pakistan has never exercised tight control of these forbidding tribal lands on the Afghan border, where real political power remains with tribal leaders. In many of these places, support for the Taliban remains huge and visceral. Rumours circulated in Peshawar yesterday that Mullah Omar himself was already in Pakistan.
General Musharraf has made it plain that the Taliban are not welcome. At a press conference in Istanbul on Tuesday with Turkey's Prime Minister, Bulent Ecevit, he said they would "not be allowed" inside Pakistan. But, as he and his corps commanders know all too well, the long border is unfenced and highly porous. They can arrive and melt into the hills without his permission.
With the Northern Alliance's triumph in northern Afghanistan, Pakistan has reverted overnight from its status as the West's brave and indispensable ally to being part of the problem.
America will soon have alternatives inside Afghanistan to the Pakistani airfields it has been using for logistical support for the air strikes.
Diplomatically, too, the boot is on the other foot. Pakistan now confronts the certainty of Burhanuddin Rabbani, head of the Northern Alliance, reclaiming the title of President of Afghanistan which the United Nations and many countries, including Britain, recognised throughout his long years of exile in northern Afghanistan. Pakistan was the only country among Afghanistan's neighbours to snub Mr Rabbani and recognise the Taliban as the country's legitimate rulers.
Likewise Pakistan's intelligence services are said to have snubbed all advances from the countries to the north.
As a result Pakistan can expect no favours from Afghanistan's new government. The notion that Pakistani troops might be part of a multinational force in the country has been fiercely rejected by the Northern Alliance.
The only way that General Musharraf can hope to recoup some of the catastrophic losses over the past few days is by taking a vigorous stand against any retreating Taliban. But this is not an easy option.
As a Pakistani newspaper, The News, put it in an editorial yesterday: "Thousands of armed, desperate fighters, who have always seen Pakistan as their ultimate destination, will have to be stopped and confronted ... Pakistan's security agencies, and even the army, will have to be prepared to fight the returning Taliban and this could turn into a messy situation if casualties mount."
By proving his sincerity to Western leaders this way, General Musharraf would incur appalling domestic risks. One reason Pakistan ended up sponsoring the Taliban was to keep its own fundamentalists busy on foreign soil, to minimise the trouble they cause at home. Now they are all streaming back. The extremists have never got a grip on the loyalties of the mass of Pakistanis, but many organs of the state, including the intelligence and nuclear establishments, have long been infested with their sympathisers.
If Afghanistan's war is heading towards a close, General Musharraf's woes are only just beginning.Reuse content