When a country with 50 nuclear weapons and hundreds of thousands of jihadi fanatics is hissing and crackling towards collapse, it is time to pay attention. General Pervez Musharraf - the man who seized power illegally in Pakistan in 1999 - is rarely more than a month away from an assassination attempt, and they are inching closer every time. So far this year, he has seen a bodyguard standing next to him shot in the neck, and driven over a bridge that was blasted to pieces just minutes later. It will take just one bullet in this curdled old general's chest for a massive nuclear arsenal to be up for grabs.
Musharraf is one of a long line of mediocre military dictators installed by the Pakistani army and backed by the White House. His grand promises on grabbing control - of a swift return to democracy and a rejuvenated economy - have been sent down the memory hole. In the name of "emergency powers", he has imposed censorship of TV and radio, and the 7 per cent economic growth he has achieved goes only to a fattening elite.
Today, the general is trapped between three very different forces. The first is a great swelling of liberal lawyers and democrats demanding basic freedoms, triggered by the Bush administration's demands for the extra- judicial "disappearance" of its enemies. This spring, the Chief Justice of the Supreme Court, Iftikhar Chaudhry, decided to probe into the long list of cases where suspected jihadis have been seized by the police and then "vanished". We know where some of them ended up, at least: of the 600 alleged al-Qa'ida suspects first detained without trial in Guantanamo Bay, 328 were captured in Pakistan. The general panicked at the prospect of his relations with the CIA being disclosed - so he sacked Chaudhry.
And then something extraordinary happened. The entire Pakistani legal profession rebelled, en masse. Sitting judges and lawyers - backed by tens of thousands of protesters - took to the streets. And then something more extraordinary still happened, something new in Pakistani history: the civilian beat the general. Musharraf backed down, and Chaudhry was restored to office.
But Musharraf is also being squeezed from another direction - an Islamic fundamentalist movement that demands even greater restrictions on basic freedoms. Karachi is being ravaged by freelance Islamist militiamen known as the Lal Masjid, who beat women who dare to drive with sticks, and have declared a fatwa against the Tourism minister, Nilofer Bakhtiar, because she was pictured - gasp! - hugging a male friend.
This kind of aggressive Wahhabism is relatively new in Pakistan. It was introduced by the military dictators to glue the country together and provide an army of holy warriors to send into Kashmir and Afghanistan. This plan was lubricated by CIA funds during the Cold War, and by Saudi oil money ever since.
It has backfired with a vengeance. As the Foreign Secretary, David Miliband, wrote this week, "Most British terrorism investigations trace back to the training camps just across the border, in western Pakistan." If it happens in Pakistan, it ripples out to here not long after.
Musharraf has always had a mixed attitude towards Islamic fundamentalism. At times he styles himself as Pakistan's Kemal Ataturk, determined to build a secular state. Yet throughout his career he has been happy to use jihadis for his own purposes, backing their activities in Kashmir and lavishly funnelling funds to the Taliban until - in the wake of 9/11 - the Americans threatened to "bomb this country back into the stone age". He then screeched into reverse and began to obey many of the US demands, pocketing $10bn in "aid" as he went.
The fundamentalists now feel betrayed, and are determined to topple him. The rallying point for the Islamists this summer came in the form of a building sitting in the shadow of Musharraf's presidential palace, called the Red Mosque. The old building was scheduled to be demolished for simple structural reasons, but rage-filled fundamentalists flocked to occupy and "save" it. The general eventually sent in the troops - massacring more than 100 civilians in the process.
Musharraf is now left as a bleak clown, trying to juggle preventing a liberal rebellion, preventing an Islamist rebellion, and pleasing the US. It cannot be done. To prevent an Islamist rebellion, he cut a deal last year in Waziristan (where Osama bin Laden is almost certainly hiding) to leave the jihadi camps alone, as long as they stopped firing at Pakistani troops. This enraged the Americans, making them tie their aid to progress in the "war on terror".
Musharraf is now trying desperately to coax back his old enemy, the former prime minister Benazir Bhutto, in the hope that her People's Party of Pakistan will broaden his tiny base of support and perhaps save him from being toppled, for a while.
But a breaking, bitter country with nukes and legions of jihadists is not a risk either India or the world can tolerate for long. There are two long-term solutions, both currently ignored by the world's governments. The first is phased, multilateral nuclear disarmament. This may sound unrealistic, but it is far more unrealistic to believe that fracturing countries can keep these weapons.
The second is to unmake this jihadism where it is smelted: in Pakistan's madrassas. There were 245 madrassas at the time of independence 60 years ago. Today there are 6,870. Since Musharraf spends just 1.8 per cent of the country's GDP on education, these are often the only schools to which the poor have access. Even though they offer a worthless, mind-withering education consisting entirely of rote-learning the Koran and other empty rituals, many parents reason that it is better than nothing. Girls are, of course, mostly denied access: only 35 per cent of Pakistani women can read and write their own names.
There is a shimmering alternative. In 1995, a group of horrified Pakistani businessmen established a charity called the Citizens' Foundation to provide a superb secular education for the very poorest children. Today they have 311 schools where 40,000 pupils are taught science and literature and the joys of life. Gordon Brown has been recently talking about finding ways to use soft power to fight the war against jihadis. Building a network of schools like this across Pakistan is one real way to win the generational fight to undermine Islamic fundamentalism.
While Pakistan waits for these sane solutions, it is breaking into jagged pieces. If we leave these shards untended, they will cut some of us - and soon.
© 2007 The Independent