It is hard to believe now, but in the spring of 2003 people were asking whether al-Qaeda was on the ropes.
"Al-Qaeda's credibility 'on the line'," ran the headline in a conservative newspaper in Washington on 24 April.
This year's attacks have killed and wounded Muslims - a risky strategy
For a while, Osama Bin Laden and his global jihad were eclipsed by the war in Iraq.
And because al-Qaeda failed to carry out any major operation during the war, experts began to wonder whether its powers were fading.
On 1 May, as he announced the end of major combat operations in Iraq, President Bush was rash enough to say he could see the "turning of the tide" in the war on terror.
As if to prove him wrong, that same month there were serious attacks against compounds housing foreigners in Riyadh and against Jewish and other targets in Casablanca.
Shift in strategy
These and subsequent attacks suggested to many experts that al-Qaeda had changed its strategy.
First, it was attacking soft targets in Muslim states closely allied to Washington: Indonesia, Turkey and Pakistan, as well as Saudi Arabia and Morocco.
This suggested it was no longer able, for the time being at least, to strike at high-security targets in North America or Europe.
Second, it was subcontracting many of its operations to local affiliates.
These include Jemaah Islamiah, the group in south-east Asia thought to have carried out an attack on an international hotel in Jakarta in August 2003, as well as the Bali bombings in 2002.
The Moroccan attacks appear to have been a joint venture, in which graduates of al-Qaeda training camps worked with young men they recruited in the Casablanca slums.
In some cases, al-Qaeda provided the money or training for operations; in other cases simply the inspiration.
The new strategy carried risks.
Operations in Muslim countries, however well targeted, are likely to kill innocent Muslims.
Al-Qaeda ideologues are ready to justify the killing of Muslims they regard as apostates.
Nevertheless they are reluctant to alienate Muslims who have in the past been sympathetic to them.
Many Muslims were horrified by the attacks in November which killed Arab expatriates in Riyadh, including women and children.
In the same month, attacks targeting synagogues and the British consulate in Istanbul also killed Muslim passers-by. Moreover the attacks in both cities took place in the holy month of Ramadan.
If this trend continues it could damage al-Qaeda and Bin Laden's carefully-cultivated image as a kind of Muslim Robin Hood.
Jihad in Iraq?
One of the most debated questions in 2003 was whether al-Qaeda was turning post-war Iraq into a new "field of jihad".
Islamic militants have undoubtedly entered the country to fight the Americans.
But experts differ over their numbers and over the scope of their activities.
It is hard to believe al-Qaeda has its own network up and running in Iraq.
But individual Islamists, whether freelance or owing allegiance to Bin Laden, do appear to have entered the country and may have teamed up with Saddam Hussein loyalists and other Sunni insurgents.
Some of the most horrific suicide bombings - against the UN headquarters in Baghdad and against Italian forces in the southern town of Nasiriya - are thought to have an al-Qaeda "signature".
But the exact role of al-Qaeda in Iraq is hard to pinpoint with any certainty.
"Are we winning or losing the global war on terrorism?" the US Defence Secretary Donald Rumsfeld famously asked in a leaked memo dated 16 October.
Were the madrassas - the Muslim schools in countries like Pakistan - churning out new terrorists, he asked, faster than the United States could kill or capture them?
"Our cost is billions," he added, "against the terrorists' cost of millions."
The attempt on Musharraf's life highlights the vulnerability of US allies
The memo suggested a more sombre realism than was apparent from the public rhetoric.
The United States and its allies have had some successes.
It is estimated that, since the 11 September 2001 attacks against New York and Washington, more than 3,000 al-Qaeda members have been killed or captured in 102 countries.
Some of al-Qaeda's assets have been frozen, and some Islamic charities suspected of channelling money to it have been monitored or closed down.
But the consensus among experts is that al-Qaeda, although weakened, will remain a serious threat in 2004.
Western embassies in Saudi Arabia continue to fear fresh attacks there.
The assassination attempt on 14 December against President Musharraf of Pakistan, which came within a whisker of success, was a reminder of the vulnerability of some of Washington's key allies.
And although there has been no major attack against a Western capital since 9/11, security experts are by no means ruling one out.
They note that statements in al-Qaeda's name have singled out European countries, such as Britain and Italy, which are giving the US staunch support.
And shivers went down American spines in June, when officials said they had uncovered an al-Qaeda plot to destroy the Brooklyn Bridge in New York, derail a train in Washington, and blow up an airliner and a string of petrol stations.
The feeling in Western capitals is that the war on terror will be, to quote Donald Rumsfeld, a "long, hard slog".