Leading article: Pakistan finally takes on the monster it created

This is a battle that Islamabad should have embarked upon long ago

This week it became brutally clear that Pakistan is effectively at war. A series of brazen assaults by jihadis on police stations, army garrisons and civilian targets across the country in recent days have claimed 160 lives. The military, meanwhile, is preparing for an assault on the militant stronghold of Waziristan.

The death toll is destined to rise further. There will be more casualties, more bombings and more turmoil in this nuclear-armed nation. This battle against a diffused guerrilla force is likely to take years, rather than months. But we need to be absolutely clear about one thing: this is not a struggle that the Pakistani state can avoid. Indeed, it is one that it should have embarked upon a long time ago.

For the best part of two decades, successive Pakistani governments tolerated the growth of Islamist militias (both in the western tribal regions and in the Punjab) in the belief that these groups were useful proxies in the regional strategic struggle with India. The country's intelligence services even funded and armed them. Just as dangerously, the authorities allowed the religious fundamentalists to establish hundreds of schools which churned out indoctrinated recruits to swell the ranks of the militias. The leaders of the Afghan Taliban were trained in such establishments.

The Pakistani authorities believed they could control these fanatics. They were wrong. Earlier this year when the Pakistani Taliban moved into an area only 100km from the capital Islamabad and began to impose their own brutal penal code on its inhabitants, the penny finally dropped among Pakistan's leaders that they had created a monster.

It is welcome that the Pakistani military and political establishment have changed their policy. The growth of religious extremism in the country has been a disaster for Pakistan's population, the vast majority of whom have no desire to live in the kind of closed, religious state favoured by the minority of fanatics in their midst.

It has also been a disaster for the wider world. Pakistan, with its fundamentalist madrassas and militant training camps, has exported the virus of extremism far beyond its own borders. Britain, with our sizeable Pakistani diaspora, has particular reason to be relieved that Islamabad finally seems to be acting. Three-quarters of all domestic terror plots under surveillance by our police and intelligence services are believed to have their roots in Pakistan. There was a clear link in the case of the foiled plot to bring down transatlantic airliners. And the organisers of the 7 July 2005 London bombings attended training camps in the country.

Yet though the army is gearing up for an assault on the militant's strongholds, there are few signs of serious action from Islamabad on the madrassas, which provide the ideological waters in which these groups swim. And there are still reports that the army is leaving alone those militant groups which are contributing to the chaos in neighbouring Afghanistan and concentrating only on those which present a direct threat to Islamabad.

It is not hard to understand why Pakistan's leaders want to keep their battle narrowly focused. The struggle will be hard and bloody enough as it is. But the clear lesson of recent decades is that it is better to confront a menace now than to let it fester and multiply. Pakistan's leaders need to recognise that their country will never be secure and prosperous until it has rooted out the cancer of extremism in its entirety.