It was timely that Osama bin Laden met his end during a period of unrest in the Arab world, and the temptation to spell out grand narratives based on the two facts is a great one indeed. But we have to take care, much greater care than many newspaper columnists are right now, because history is rarely so neat as to hand us a series of complementary developments which lead so easily to an obvious conclusion. No, there are a number of different things going on right now, and if you untangle them then the picture is not so clear; here is why.

Bin Laden's movement, Al-Qaeda, has two principal strategic goals: exhausting the West and overthrowing non-Islamist regimes that the West supports, all the better to replace their regimes with Islamist ones. Within the movement, different individuals place varying emphasis on the two goals, and one is bound to be stressed over the other at particular times because of particular opportunities or constraints on the movement. The Iraqi civil war, for instance, was an opportunity to try to establish an Islamist regime in Iraq, one which failed to be realized.

This movement has never relied on broad popular support and has been organized along Leninist principles: a vanguard of true believers would bring about a revolution from above. Indeed, where the movement has managed to actually achieve the responsibilities of governing, as in areas of Sunni Iraq during the Iraqi civil war, it has often been confounded by its inability to gain this support. In Iraq, the local Sunni populace turned against the Islamists, leading to the events the Americans call the "Anbar Awakening". Al-Qaeda in Iraq still exists but as a much-smaller terrorist group rather than a broad-based insurgency. It has hence returned to a situation similar to other parts of the Al-Qaeda movement, and carries out the occasional piece of armed propaganda to remind us.

The loss of support for Al-Qaeda has been notable across the Muslim world and has been continuing for some years, and can broadly be ascribed to the movement's obvious brutality - witness the killing of Benazir Bhutto and the general quantity of Muslim blood on Al-Qaeda's hands, much greater than the quantity of western blood - and a loss of allure due to a series of huge strategic setbacks, starting with events in Iraq and the American drone campaign in Pakistan, and ending with this latest, the killing of Osama bin Laden.

But one thing is clear to my mind. It is simply not true that the shaking of the foundations of the Arab world's dictatorships by popular protests is an unalloyed strategic setback for Al-Qaeda and the broader movement of violent jihadists, and it is certainly not true that we can now somehow close the book on what started (for us) on 9/11.

Al-Qaeda, having never relied on popular support or even particularly courted it, never expected to be at the forefront of a movement like the one that occupied Tahrir Square in Cairo. If it had, then its operatives would have spent their time starting Facebook groups and organizing gatherings. Al-Qaeda's whole ideology is based on the impossibility of negotiation and compromise with the world as it exists right now, and so such actions would appear to them as futile; witness how long it took even the Muslim Brotherhood, a more moderate expression of Islamism, to join the protests in Egypt. The brotherhood's quietism - or the young liberals might say, their cowardice - is one response to iron Arab dictatorship. Al-Qaeda's strategy of bombing first and asking questions later is another.

Popular revolts which are not led by Al-Qaeda or are against Al-Qaeda are hence not, on their own, a mortal threat to the movement. Al-Qaeda has lived in spite of the active oppression of Arab governments for a long time now, and in fact, the more significant strategic development for Al-Qaeda in the Arab Spring is the undermining of the strength of these dictatorships. What is likely to follow the revolts in the Arab world is not an immediate transition to liberal harmony and prosperity which undermines the appeal of violent jihad, but a fractious, chaotic and confusing situation which will increasingly favour any demagogue who claims to have a simple answer. That demagogue is likely to wear an imam's turban. The Arab liberal is likely to defend his right to say it; the state security apparatus is likely to be too weakened and discredited by the liberal to respond; the demagogue will grow in strength.

This weakening of the iron Arab state - if indeed it does occur, which is still unclear - will increase the freedom of action for Al-Qaeda, not diminish it. It represents the achievement of one of the movement's strategic goals. And as Henry Kissinger remarked in this context recently, those who lead revolutions rarely ever survive their maturation: they are swept aside and exploited by more organized and more ruthless forces. The February Revolution was not the end of Bolshevism; it was the beginning of the creation of the conditions for its final fruition.

It is important to distinguish between more moderate, mainstream expressions of Islamism - such as my demagogue above - and the Al-Qaeda movement, but the point is the general direction of travel. As I say, Al-Qaeda do not seek to govern. They seek a place to survive and plot killings. The Arab dictatorships could hardly be a less conducive place for Al-Qaeda to try to thrive, and the successor regimes are likely to be more hospitable, be it because they are weaker or because they are more tolerant of Islamism. Add to this the probability that we are heading for a period of increased violence and chaos in Afghanistan, and increased Taliban control over parts of that country, and the environment for Al-Qaeda does not look so bad at all.

It has been a frequent mistake of Western foreign policy to place too much emphasis on global public opinion as the key to security. Al-Qaeda did not become an epoch-defining organization because they were popular among Arabs, they became an epoch-defining organization because they felled the Twin Towers and put a hole in the Pentagon. It remains an untested hypothosis whether their decline in popularity will have a significant effect on their ability to carry out terrorist attacks; there does not seem a logical reason why it should. There will always be embittered Muslims. There will always be grievances with the West. There will always be cities, regions, countries in which to hide and prepare. 9/11 did not require the support of millions of Arabs; it required the fanatical devotion of a few dozen. Its impact on the West was just the same.

This is why, inevitably, the current tone of triumphalism about the death of Osama bin Laden and the Arab Spring will evaporate when a new terrorist spectacular happens all the same. We have been close, very close, many times in recent years; our continued good fortune depends more on the transformation of our counter-terrorism efforts since 9/11 than on what happens in Tahrir Square. The threat of terrorism is inherent in globalization and advancing technology; our response to it is inherent in the high value we place on human life and our intolerance for insecurity. The death of Bin Laden does not close the chapter on a long nightmare, it simply prepares the ground for the new nightmare that will begin when we realize that this problem will be with us for as long as our borders are open and our societies are free; for as long, that is, as we remain ourselves, in spite of the terrorist's efforts to change us. Such things do not have such a simple end.