President Obama's first visit to an American mosque since taking office predictably drew criticism from his opponents on the campaign trail and conservative commentators. But what was the reaction from the world's 1.5 billion Muslims?
For the most part, a collective shrug.
The symbolism of Wednesday's visit did not go unappreciated, especially in the U.S., where Obama was lauded for taking a stand against the inexcusable political rhetoric against Muslims and exhorting Americans not to confuse millions of patriotic citizens with a "radical, tiny minority" who engage in violence. But many wondered why the president had waited until his seventh year in office.
President George W. Bush visited a mosque in Washington within days of the Sept. 11, 2001, terrorist attacks, to reassure American Muslims and appeal for tolerance.
The Council on American-Islamic Relations and other Muslim groups had been urging Obama to make a similar visit for years. Obama has visited mosques during official visits abroad, including in Egypt and Indonesia. But the president's aides feared such a visit in the U.S. would feed the rumors -- inaccurate but persistent-- that Obama is a Muslim.
"Maybe he feels comfortable there," Republican front-runner Donald Trump said of Obama's visit on Fox News, a loaded comment from someone who has appeared to question Obama's Christian faith as well as his birthplace.
Obama's visit also drew criticism from Sen. Marco Rubio (R-Fla.) who accused the president at a town hall in New Hampshire of "always pitting people against each other. Always."
However, Obama was received warmly at the Islamic Society of Baltimore, where he noted that Jefferson's opponents "tried to stir things by suggesting he was a Muslim, so I was not the first. I'm in good company."
Zainab Chaudry, the council's outreach manager in Maryland, said the visit was "a significant step in the right direction and will hopefully encourage our nation's political and religious leaders to join him in pushing back against rising Islamophobia."
The visit also generated some self-deprecating humor, including this tweet from the author, lawyer and Harvard University scholar Qasim Rashid:
Outside the U.S., however, the speech had little impact.
Many Muslims said there was a disparity between Obama's rhetoric and his administration's policies in the Middle East and South Asia, which they believe have done little to end the wars in Syria, Iraq, Yemen and Afghanistan.
"As words, they sound beautiful but [U.S.] actions are as ugly as they have been," said Mohammad Modaser, a 29-year-old Kabul resident who works for the Afghan Education Ministry.
"A lot of Muslims were hopeful when he first took office for better days in the Middle East and Islamic world," Modaser said. "But nothing actually changed. The wars in Palestine, Syria, Iraq and Afghanistan got worse every day. Peace in Afghanistan is still a myth. Muslims' treatment particularly in the U.S. -- like second-class citizens -- has not changed."
Emran Feroz, an Afghan journalist who runs Drone Memorial, a website that tracks deaths from drone strikes, tweeted:
Feroz was apparently referring to U.S. airstrikes in Nangarhar province in eastern Afghanistan on Monday that local officials said killed more than two dozen people and destroyed a radio station belonging to members of Islamic State, the militant organization based in Iraq and Syria. U.S. officials have confirmed launching two airstrikes but did not specify the targets.
In the Middle East, media outlets devoted little, if any, coverage to Obama's speech, which took place late in the night there.
"I didn't even know Obama was visiting a mosque yesterday," said Marwan Saied, 47, a grocer in the Egyptian capital, Cairo.
"I personally like Obama, he continued. But I don't think he did anything dramatic that we as Muslims can see as a major change in U.S. policy toward Muslims and the Middle East. People are still suffering in Palestine, Iraq and Libya, and many people that I personally know are still partly blaming America for that."
"If we're serious about freedom of religion — and I'm speaking now to my fellow Christians who remain the majority in this country — we have to understand an attack on one faith is an attack on all our faiths.
In Iran, only the hard-line Fars news agency reported on the visit. The brief article took issue with Obama for defending Jews, even while visiting a mosque at a time when Islamaphobia has reached a climax in the U.S.
The news agency appeared to be referring to a section in the speech in which Obama noted that anti-Semitism in this country has a sad and long history. The president also said, if we're serious about freedom of religion -- and I'm speaking now to my fellow Christians who remain the majority in this country -- we have to understand an attack on one faith is an attack on all our faiths."
The response to his remarks was very different in 2009, when Obama addressed the Muslim world from Cairo University and promised a new beginning in relations with the United States. That speech was broadcast live across the region and was still being discussed weeks later.
These days, people are more preoccupied with issues closer to home, said Mustafa Ellabbad, director of Al Sharq Center for Regional and Strategic Studies in Cairo.
"We have the civil war in Syria and unrest in Yemen, Libya and Iraq. We have terrorists threats in almost every Middle Eastern country and Daesh in Syria and Iraq," he said, using the Arabic acronym for Islamic State. "All of these factors are contributing to the current situation, where people are more consumed with their domestic events rather than U.S. politics."
Although the U.S. is still considered a major force, it is no longer viewed as the only significant foreign player in the Middle East. Russia in particular has provided critical military backing to Syrian President Bashar Assad, while the U.S. has been more preoccupied with fighting Islamic State than removing Assad from power.
Obama is also nearing the end of his term, and attention is turning to who might succeed him. Many in the Middle East are concerned about Trump's call for a total and complete shutdown of Muslims entering the United States, and opposition from other Republican candidates to admitting refugees from Syria's civil war out of fear that they could include people with ties to extremist groups.
"Nonetheless, yesterday's speech still gives a very positive message to millions of people in the Middle East," Ellabbad said. "It tells them that the U.S. is not just Trump and right-wing Republicans. It shows people here that there are still good politicians in the U.S. who are using the language of sense and politics over the language of extremism."
Qibla Ayaz, a former dean of Islamic and Oriental Studies at the University of Peshawar, in Pakistan, said Obama's visit would help dispel the impression that conflicts in Afghanistan and the Middle East are a war between Christianity and Islam.
"President Obama's statement will not only give confidence to the Muslim community in America but will also promote harmony among various faiths, especially Islam, Christianity and Judaism across the world," Ayaz said.
The Muslim Council of Britain used the occasion to encourage fellow Britons to visit local mosques on Sunday, which it is promoting as #VisitMyMosque Day.
More than 80 British mosques are taking part in the event, which aims to provide a platform for Muslims to reach out to their neighbors and explain their faith at a time of tension between religious communities.
In India, where many minority Muslims have expressed concern over policies that they say favor the Hindu majority, some commentators wondered whether Prime Minister Narendra Modi should follow Obama's lead.
Kumar Shakti Shekhar, a journalist, wrote on the Daily O website that Muslims in India have felt slighted by the governing Bharatiya Janata Party's support for a ban on beef in some states, and comments by some party leaders that have been perceived to be anti-Muslim.
"In such circumstances, it is well in the interest of the nation that Modi emulates Obama and visits a mosque in India," Shekhar wrote, noting that Modi, like Obama, previously visited a mosque overseas.
Underscoring the political costs confronting both Modi and Obama, however, Shekhar wrote that the Indian leader should not make such a visit because it could end up alienating his conservative Hindu base.
Special correspondent Hassan reported from Cairo and Times staff writers Zavis and Bengali from Los Angeles and Kolhapur, India, respectively. Special correspondents Christina Boyle in London, Ramin Mostaghim in Tehran, Zulfiqar Ali in Peshawar and Ali M. Latifi in Kabul contributed to this report.