Is the Arab Spring good or bad for terrorism?
In foreign ministries and intelligence agencies on either side of the Atlantic, counter-terrorism officials are asking themselves the same question over and over: is the so-called Arab Spring good or bad for terrorism?
Six months down the line, it is a mixed picture.
The collapse of unpopular, undemocratic regimes in Tunisia and Egypt has certainly removed a major grievance, although neither country is finding the path to democracy trouble-free.
But the slow-motion agony of Yemen, Libya, Syria, and to some extent Bahrain, as protesters vent their anger with their rulers, raises the spectre of long-term violence.
Al-Qaeda and global jihadists, who found themselves left behind by the wave of liberal protest, are now looking at ways to exploit the situation, while Iran is taking a close interest in Bahrain's troubles.
And what of Western security and intelligence agencies that swallowed their distaste and forged links with regimes that had scant regard for human rights? What has become of those relationships, and is there now a backlash by some at this apparent Western support for their erstwhile rulers?'Bleeding every day'
In the Middle East, the country that most worries the "spooks", the spies and counter-terrorism experts, is Yemen.
End Quote Abdulla al-Radhi Yemeni ambassador to UK
Yemenis are bleeding every day in Shabwa and Abyan fighting al-Qaeda. If the international community closes its eyes then they will get stronger and stronger”
Already home to Al-Qaeda in the Arabian Peninsula (AQAP), considered the most dangerous of all the movement's regional offshoots, Yemen's security situation has been deteriorating steadily all year.
In the capital, Sanaa, this month, tribal gunmen have fought running street battles with soldiers loyal to President Ali Abdullah Saleh.
With the wounded president out of the country there has been a truce of sorts but, in the south of Yemen, al-Qaeda and its affiliates are trying hard to seize towns and villages from a government weakened by months of popular protests and defections.
Yemen's ambassador to the UK, Abdulla al-Radhi, tells me they pose a growing threat.
"Al-Qaeda, they take advantage of the recent situation in Yemen, and of course I cannot say that we are facing an easy enemy. They are becoming stronger and stronger, especially after the crisis we are facing in Yemen.
"Yemenis are bleeding every day in Shabwa and Abyan fighting al-Qaeda. If the international community closes its eyes then they will get stronger and stronger," he said.
Britain is now on standby to evacuate its citizens from Yemen if the situation deteriorates further. The man in the hot seat there is the ambassador, Jon Wilkes, in Sanaa. We spoke to him by phone.
He said the problem in Yemen and possibly other Arab countries was that the transition processes could lead to instability, leaving "opportunities for al-Qaeda and other extremist groups to take advantage, to spread their influence or to consolidate their presence".
"But overall I think it's pretty clear that what is happening in the Arab Spring is actually a rejection of the ideology and values that al-Qaeda attempts to propagate," he said.
That may be true but it will not stop jihadists from trying to exploit the confusion.
Over in Libya, opponents of Col Muammar Gaddafi's regime are suspected of including elements sympathetic to al-Qaeda.
Over the years a large number of Libyans set off from the east of the country around the town of Derna to wage jihad in Iraq and Afghanistan, and it is quite possible that a year from now some hardened Islamists will end up in a post-Gaddafi government.
Meanwhile, Al-Qaeda in the Islamic Maghreb (AQIM), al-Qaeda's offshoot in southern Algeria and the Sahara, has been looking at ways of taking advantage of Libya's conflict.
Looser border controls, deserting guards, and looted weapons stocks could all play into their hands, and the US is particular concerned to keep Libya's arsenal of mustard gas and man portable surface-to-air missiles out of terrorist hands.'False narrative'
In Egypt, the euphoria that greeted the departure of President Hosni Mubarak in February has long since evaporated. The collapse of his all-pervasive security apparatus, the dreaded Amn Al-Dawla, has been accompanied by a rise in religious extremism.
End Quote Nabila Ramdani LSE
The deceit was that either you have your dictators and relative stability, or else you have al-Qaeda and global jihad”
Last week, Britain's Archbishop of Canterbury spoke out of his concerns for Egypt's estimated seven million Christians after attacks on their churches, blamed on hardline Islamic Salafists.
Al-Qaeda's newly appointed successor to Osama Bin Laden as its head is an Egyptian, Dr Ayman al-Zawahiri, whose doctrines were forged first in Egypt's Muslim Brotherhood, then in Mr Mubarak's prison cells, and then later at Bin Laden's side in Pakistan and Afghanistan. There is some speculation now as to whether he will turn al-Qaeda's attention towards his former homeland.
Meanwhile, Western governments, which cautiously welcomed the Arab Spring, are now having to rebuild some of their security links with a Middle East that is on the move.
Having largely failed to see the Arab Spring coming, at least with the speed and force it did, is their entire intelligence network in the region really now in ruins?
No, said one analyst flatly. It is about how quickly and effectively you can adapt to the newly changed circumstances, it is about finding common ground with new partners and moving with the times, he continued.
But as the Middle East adjusts to those new realities, many of its citizens are unlikely to forget in a hurry the links between Western governments and their former oppressors.
Nabila Ramdani, from the London School of Economics (LSE), has been following the twists and turns of the Arab Spring since its inception.
"I think the West's relationship with autocrats like President Saleh in Yemen and indeed President Mubarak in Egypt made a massive contribution to international terrorism.
"The deceit was that either you have your dictators and relative stability, or else you have al-Qaeda and global jihad, and the ideas were that those dictators were working hand in hand with the Americans to bring about peace, stability, and to fight the so-called war on terror," she said.
"But this narrative was of course false, and especially because it denied democracy, and even more sinister, it bred terrorism," she said.
Six months on, the Arab Spring still has a long way to go.
Relationships between countries are being recalibrated and there are certainly risks - in the short-term - of increased violence.
But whatever mistakes the West has made in the past, democracy, when it eventually comes, is likely to be the most effective antidote yet to the scourge of terrorism in the Middle East.