More than three years ago, President Obama famously told a Cairo audience that "we meet at a time of great tension between the United States and Muslims around the world". His speech, titled A New Beginning, sought to transcend the acrimony of the Bush era.
This week, as violent protests rage across the Middle East and beyond, the president might ask himself: What went wrong? The truth is that there is no single explanation.One answer is that last year's wave of political uprisings, the so-called Arab Spring, is responsible.
After all, protests began in Egypt, which last year became the most populous Arab democracy, and spread to Libya, which became the largest by area. The Arab Spring did indeed invigorate a range of Islamist movements and weakened the law enforcement capabilities of the affected states.
In that febrile political environment, protests might have been easier to start, simpler for violent extremists to exploit, and harder for confused security forces to manage. The second argument is that we are witnessing profound anti-Americanism, dormant for much of last year, fused with religious extremism - with the controversial 'Innocence of Muslims' film merely a trigger.
According to a June 2012 Pew survey, just 15% of those in Muslim countries held a favourable opinion of the United States, compared to 25% in 2009. Polls indicate that anti-Americanism stems from a variety of grievances, including US policy towards the Israeli-Palestinian conflict, American wars in the Middle East, and US backing for friendly dictators.
The irony is that, whereas President Obama is sometimes pilloried by critics in the West for naively supporting the revolutions, most Arabs see his actions as too late and too little. In Tunisia, for instance, only a third believe that the US response to their revolution had a positive impact. We should, however, distinguish anti-Americanism from religious extremism.
Although Arab ideas about freedom of expression are fundamentally different from Western ones - (84% of Egyptians want the death penalty for those who leave the Muslim religion) - there are big generational gaps. Those under 35 - the generation widely held up as the engine of the Arab Spring - are far less likely to pray several times a day, attend the mosque regularly, or read the Koran daily. They are being catalysed less by religion, and more by politics.
Anti-Americanism is not universal.
Despite the widespread xenophobia evident in Egypt, 35% of Egyptians actually want Egypt-US relations to remain as strong as they were before the revolution, and a surprisingly high 20% want them to get even better. Sixty percent of Tunisians say that they like American ideas about democracy.
A Gallup poll this year showed that 54% of Libyans approve of American leadership, near the highest approval ever seen in the region. Indeed, Libya has seen a series of protests supportive of the US, and against the attack on the US consulate in Benghazi.
Perhaps the most important fact is that the crowds ransacking embassies this week are negligibly small when compared to the popular mobilizations that swept away dictators. Even where it is widespread, anti-Americanism is simply not a sufficient explanation for outbreaks of violence. In many cases, protests might have had little energy if local religious and political entrepreneurs, eager to bolster their following and create disorder, had not exploited them. In Khartoum, for instance, local buses were offered free to transport prayer-goers to protest sites.
The assault in which US Ambassador Chris Stevens died was not a protest but probably a co-ordinated, complex undertaking by an organized militant group, perhaps in concert with al-Qaeda's North African affiliate. It does not represent the broader Libyan opinion of America. This wave of violence will have longer-term repercussions. The US has no legal mechanism to censor the provocative film and, with eight weeks to go before a national election, President Obama will be careful not to appear unduly willing to appease mob violence.
In Egypt, American faith in President Mohammed Mursi has been badly shaken. Despite Egypt's continued military and financial dependence on Washington, Mr Mursi hesitated in condemning the protests. President Obama's admission that "I don't think that we would consider [Egypt] an ally, but we don't consider them an enemy" highlights how the political sands are shifting.
There will now be new pressures for the US to disengage from the Middle East, revert to fortress-style embassies, and accelerate the refocusing of American attention to Asia. Some will argue that Mr Obama's efforts to temper anti-Americanism were exercises in naivety; others that he went nowhere near far enough. Either way, the irony is that fragile post-revolutionary governments are in need of assistance to build institutions and their own populations are making that task harder.