There’s been a bit of talk in the last couple of weeks about what a blow the wave of Middle Eastern revolutions has been to al-Qaeda and its terrorist agenda. The masses seem to be much more interested in democracy and human rights than Islamic fundamentalism, and mass protest rather than terrorism has been shown to be the real threat to autocracy.

As an expert quoted in Sunday’s New York Times put it, “Democracy is bad news for terrorists.”

But it’s worth looking at the other side of the coin. Just as recent events refute the worldview of al-Qaeda — that repressive pro-Western regimes are so firmly entrenched they need to be blasted out by terrorism — they do equal damage to the parallel view espoused by so many autocrats and their Western supporters.

For nearly a decade now the standard response from petty tyrants around the world accused of acts of repression has been “al-Qaeda made me do it!” Far too often, Western governments and media have let them get away with it.

To pick just one example, take the bloody crackdown on opposition protesters in Uzbekistan in 2005.

The Uzbek authorities blamed “foreign destructive forces”, abetted by “so-called human rights groups and foreign media”. Rather than a home-grown pro-democracy movement, they claimed to be facing “a foreign-assisted coup aimed at forming an Islamic caliphate.”

The same rhetorical turn has been used to justify repression as far afield as Chechnya, Xinjiang, Kashmir and southern Thailand, as well as right across the Middle East. Dictators have learnt that the best way to stifle Western criticism is to paint themselves as the only alternative to “Islamist” terrorism.

Even when the allegations of al-Qaeda involvement have some substance to them — as they may, for example, in Somalia — there is usually an element of self-fulfilling prophecy: because the West shies away from any movement that looks even vaguely Islamic, it creates an opening for the real extremists.

It will be not the least of Colonel Gaddafi’s rather meagre contributions to human welfare if he renders this justification unusable for the future.

It’s not just that Gaddafi blamed al-Qaeda, with no shred of evidence, for the uprising against his rule. It’s that the allegation was so completely over the top, so transparently a matter of sheer desperation, coupled as it was with every other bogeyman he could think of — no matter how mutually contradictory.

From now on it will be difficult for any autocrat to cite an al-Qaeda threat with a straight face. Gaddafi’s example will always be there as a sort of reductio ad absurdum to prevent it from being taken seriously.

Sure enough, Yemen’s embattled president Ali Abdullah Saleh switched overnight from his usual role of bulwark against terrorism and instead blamed a storm orchestrated from Tel Aviv and under Washington’s supervision” for his troubles. But, of course, while both the “al-Qaeda” meme and the “Western imperialism” meme might in certain circumstances have some plausibility, using them together is a sure sign that neither is meant seriously.

Perhaps now the West will have to actually look at each protest movement in its own context to work out what is going on, rather than just accept every disturbance as being the fault of Osama bin Laden and his vast international conspiracy.

And if we’re very lucky, it may be that Gaddafi’s words will even put a dent in the habit of blaming so many of our own social problems on “young people on drugs”.