In June 2009, addressing a packed audience at Cairo University, US President Barack Obama offered Muslims "a new beginning" based on "mutual interest and mutual respect".
The speech was well received. The president was riding a wave of goodwill.
But since then, the mood has changed. Recent polls show that, in key parts of the Muslim world, his credibility has slumped.
Now he has a second chance to return to some of the themes he set out in Cairo.
On 9 November Mr Obama will visit Indonesia - a trip already twice postponed - on the second leg of an Asian tour that also takes him to India, South Korea and Japan.
According to presidential aide Ben Rhodes, the visit will highlight the close ties between the United States and the world's biggest Muslim-majority country on issues ranging from climate change to counter-terrorism.
It will also underscore the personal connection between Mr Obama and a country where he spent part of his boyhood.
In a big public speech in Jakarta - expected to be at the University of Indonesia - the president will highlight Indonesia's role as an "emerging democracy" and its tradition of tolerance and pluralism.
'Work cut out'
Challenged on whether the pledges laid out in the Cairo speech had been fulfilled, Mr Rhodes acknowledged it was a mixed picture.
On Iraq, he said, "we've delivered". The US had pulled out its combat troops by the August 2010 deadline the president had set himself and there had been some success in "degrading al-Qaeda".
On the Middle East peace process, there had been "some false starts", but the administration was encouraging the parties to keep talking.
And on Iran, the administration had "changed the context" by uniting a coalition of countries behind new UN sanctions. If Iran was failing to live up to its obligations, that was Iran's fault, he added.
But many experts in Washington say the administration has its work cut out convincing the sceptics.
Revelations by journalist Bob Woodward about its indecision over Afghanistan have been damaging.
Mr Woodward's latest book, Obama's Wars, paints a picture of a dysfunctional administration riven by splits over whether to agree to the military's request for more troops. It depicts a president who gave in to pressure - and has little faith in his chosen course.
One of Washington's elder statesmen, Thomas Pickering, blames the spin-doctors.
The current administration is "heavily dominated by domestic political advisers" whose priority is the president's re-election in 2012, says Mr Pickering, the UN ambassador during the George H W Bush administration, from 1989 to 1992.
Their goal - unrealistic, in Mr Pickering's view - is "to present the president with risk-free or nearly risk-free alternatives". Foreign policy just does not work like that.
Whether it is possible for the American superpower to win Muslim hearts and minds - and if so, how - is a debate that has raged since George W Bush's second term.
It was then, as things were going badly in Iraq, that officials began to talk about a long-term "ideological war" against global extremism.
Winning this "war of ideas" required helping the Muslim mainstream resist the siren song of the radical fringe.
Many experts are struck by the degree of continuity between the two administrations.
Although President Obama has made some crucial changes - prohibiting torture, and banishing the term "war on terror" from official discourse - he has stuck with many of the security policies of his predecessor.
Covert operations in Afghanistan - fresh details of which were revealed by Mr Woodward - have been stepped up.
Issues surrounding the status of prisoners in Guantanamo, and whether and where they should stand trial, are unresolved.
Strikes by Predator drones against suspected al-Qaeda militants in Pakistan have increased.
President Obama's efforts to reach out to Muslims abroad have undoubtedly been hampered by new controversies over Islam at home.
This year's anniversary of the 9/11 attacks by al-Qaeda on New York and Washington was overshadowed by an ugly outburst of Islamophobia.
Controversy raged over the planned construction of an Islamic centre in Manhattan - and the threat by an obscure Florida pastor to publicly burn the Koran.
With mid-term elections looming, some of the president's Republican opponents sought to exploit the anti-Muslim mood for political gain.
The administration's critics - on both left and right - think it has been too timid in speaking out on governance and human rights in the Muslim world.
Writing in the journal Foreign Policy, Ellen Laipson - a former National Security Council official who runs the Stimson Center, a Washington think-tank - says the president should rethink his policy of engagement with the Muslim world.
His priorities, she argues, should be "strengthening public institutions, promoting democratic values and practices, and speaking out when gross injustices occur, even in states that are officially friendly to America".
Offering an outstretched hand to the Muslim world - whether in Cairo or Jakarta - is a sign of a president reluctant to put all his faith in military power.
He believes global problems require "soft-power" solutions, not just Predator strikes.
But two years after his election, many in the Muslim world and beyond have yet to be persuaded he can deliver.Roger Hardy is based in Washington at the Woodrow Wilson International Center for Scholars. He is the author of The Muslim Revolt: A Journey through Political Islam, published earlier this year.