THE death of 10 French soldiers in a Taleban ambush on Tuesday brought French President Nicolas Sarkozy immediately to the French base in Afghanistan. He was there with personal condolences to his country’s troops, along with his assurance that France would honor its dead by redoubling its efforts to defeat the Taleban. But as political acts go, this was meaningless.

History shows that Afghan insurgents — whether in the 19th century against the British, in the 1980s as Mujahedeen against the Soviet invasion or today as the Taleban in the face of the foreign troops of NATO — cannot be defeated militarily. The country is too complex and hard of access for the necessary devastating force to be brought to bear upon the insurgents. Even with spy satellites, communications intercepts and complete air control, the most advanced technology that NATO can deploy is not working. Indeed all the signs are that the Taleban are spreading from their heartland in the south and along its border with Pakistan and are now threatening the capital Kabul and other major cities that only a year ago were thought safe.

This is a hit-and-run war in which the initiative almost always is with the insurgents. The Taleban have no real bases to defend and few places where their retreat from attacks can be blocked successfully. For NATO’s armies and for the functioning of everyday life in Afghanistan, logistics demand that most goods and people travel by road and these highways, virtually indefensible along their entire length, are the soft underbelly at which insurgents have struck throughout history and are now striking again with deadly effect.

While today the Taleban have no hope itself of defeating NATO militarily, it can damage the organization politically by making the cost of maintaining foreign forces in defense of the Karzai government increasingly unacceptable to voters back home. Further, by obstructing or actually halting aid and reconstruction efforts, the Taleban can also undermine the confidence of ordinary Afghans in their government. The calculation must be that in the end, those who now support the modernizing efforts of the administration in Kabul will be prepared to change sides simply for the sake of peace.

The problem is that the Taleban have proven themselves utterly inept at the business of government and worse, have hosted Bin Laden and his terrorists. Were they ever to return to power, Afghanistan would once again become an impoverished, pariah state whose only industry would be the evil of narcotics and the suppression of human rights.

It never had to be this way.

Two crucial factors have been neglected. The first was the abject failure of much of the international community to deliver on its generous promises of aid for reconstruction and development of the Afghan economy.

Failing to fulfill those commitments, on the grounds that the security situation was not quite right, has served to make the security situation worse. The second has been the constant refusal of the Karzai government to talk to the Taleban and seek to include them in the administration. Yet lasting peace will only come through compromise — never through the barrel of a gun.