In the five years since September 11, the tactics and strategy of Islamic extremists fighting US or Nato forces have improved dramatically.
To a degree they could not approach five years ago, the extremists are successfully facing off against the overwhelming technological apparatus that modern armies can bring to bear against guerrillas.
Islamic extremists are winning the war by not losing and they are steadily expanding to create new battlefronts.
Imagine an Arab armed group that is never seen by Israeli forces, never publicly celebrates victories or mourns defeats and merges so successfully into the local population that western TV networks can't interview its commanders or fighters.
Such was the achievement of Hezbollah's 33-day war against Israeli troops, who admitted that they rarely saw the enemy until they were shot at.
Israel's high-tech surveillance and weaponry were no match for Hezbollah's low-tech network of underground tunnels. Hezbollah's success in stealth and total battlefield secrecy is an example of what militants are trying to do worldwide.
In southern Afghanistan, the Taliban have learned to avoid US and Nato surveillance satellites and drones in order to gather up to 400 guerrillas at a time for attacks on Afghan police stations and army posts.
They have also learned to disperse before US airpower is unleashed on them, to hide their weapons and merge into the local population.
In North and South Waziristan, the tribal regions along the border between Pakistan and Afghanistan, an alliance of extremist groups that includes Al Qaida, Pakistani and Afghan Taliban, Central Asians and Chechens has won a significant victory against the army of Pakistan.
The army, which has lost some 800 soldiers in the past three years, has retreated, dismantled its checkpoints, released Al Qaida prisoners and is now paying large "compensation" sums to the extremists.
This region, considered "terrorism central" by US commanders in Afghanistan, is now a fully operational Al Qaida base area offering a wide range of services, facilities and military and explosives training for extremists around the world planning attacks.
Waziristan is now a regional magnet. In the past six months up to 1,000 Uzbeks, escaping the crackdown in Uzbekistan after last year's massacre by government security forces in the town of Andijan, have found sanctuary with Al Qaida in Waziristan.
In Iraq, according to a recent Pentagon study, attacks by insurgents jumped to 800 per week in the second quarter of this year double the number in the first quarter.
Iraqi casualties have increased by 50 per cent. The organisation Al Qaida in Iraq has spawned an array of new guerrilla tactics, weapons and explosive devices that it is conveying to the Taliban and other groups.
Moreover, efforts by armies to win the local citizens' hearts and minds and carry out reconstruction projects are also failing as extremists attack "soft" targets, such as teachers, civil servants and police officers, decapitating the local administration and terrorising the people.
No doubt on all these battlefields Islamic extremists are taking massive casualties at least a thousand Taliban have been killed by Nato forces in the past six months. But on many fronts there is an inexhaustible supply of recruits for suicide-style warfare.
Western armies, with their Vietnam-era obsession with body counts, are not lessening the number of potential extremists every time they kill them but are actually encouraging more to join, because they have no political strategy to close adjacent borders and put pressure on the neighbours.
Militants from around the Arab world and even Europe are arriving in Iraq to kill Americans. Yet the United States refuses to speak to neighbours Syria and Iran, which facilitate their arrival.
Hundreds of Pakistani Pashtuns are joining the Taliban in their fight against Nato. Yet Nato has adopted a head-in-the-sand attitude, pretending that Afghanistan is a self-contained operational theatre without neighbours and so declining to put pressure on Pakistan to close down Taliban bases in Balochistan and Waziristan.
If this is indeed a long war, as the Bush administration says, then the United States has almost certainly lost the first phase.
Guerrillas are learning faster than western armies and the West makes appalling strategic mistakes while the extremists make brilliant tactical moves.
As Al Qaida and its allies prepare to spread their global jihad to Central Asia, the Caucasus and other parts of the Middle East, they will carry with them the accumulated experience and lessons of the past five years. The West and its regional allies are not prepared to match them.
Ahmed Rashid, a Pakistani journalist, is the author of "Taliban" and "Jihad: The Rise of Militant Islam in Central Asia".