(CNSNews.com) - "Muslim-Americans are as patriotic, as integrated, as American as any other members of the American family," President Obama told a Muslim gathering at the White House on Thursday.
"Whether your family's been here for generations or you're a new arrival, you're an essential part of the fabric of our country."
Obama said Muslims of all backgrounds have for "centuries" helped to build America as farmers, merchants, factory workers, architects, teachers and community leaders. "And Muslim Americans have enriched our lives every single day," he said.
"You're the doctors we trust with our health, entrepreneurs who create jobs, artists who inspire us, activists for for social justice like the LGBT Muslims who are on the front lines in the fight for equality."
The remark drew applause.
But as CNSNews.com reported in June, half of the countries in the world where homosexual behavior is legally prohibited are Islamic states, and in 13 of those countries, the death penalty is codified in shari’a (Islamic) law.
Last month, American-born Muslim Omar Mateen attacked a gay nightclub in Orlando, Fla., killing 49 people. Press reports at the time said Mateen may have frequented gay clubs.
The president also singled out American fencing champion Ibtihaj Muhammad: "She's going to be proudly wearing her hijab when she represents America at the Rio Olympics. No pressure," he joked.
Obama said these are "challenging times" for Muslims: "Like all Americans, you worry about the threat of terrorism. But on top of that you fear the entire community will be blamed for the violent acts of a few who do not represent your faith."
He mentioned a "heartbreaking" letter he received from a young woman named Aisha: "She told me, 'There are moments in my life when I just want to take off my hijab and leave my identity behind so I can fit in with my peers.'
"Now that's a young American full of promise, full of possibility, fearful because of her faith. And we see a spike in Muslim-Americans, including children, being attacked, mosques being targeted, especially during the final holiest days of Ramadan. And that shouldn't be happening in the United States of America."
It's no coincidence that Obama hosted the Eid al-Fitr celebration just hours before Republican Donald Trump spoke at the Republican National Convention.
At the beginning of his remarks, the president noted that for the past seven years, he's held an Iftar dinner, which happens during Ramadan. "This year, for my last year as president, I wanted to do something a little bit different," he said.
"I know we are a little late this year. The advantage is that you're not as hungry as you were a couple of weeks ago," he joked.
Eid al Fitr, which marks the end of Ramadan, took place on July 6 this year.
Just as Obama publicly embraced Muslims on Thursday, on Friday he will host the president of Mexico at the White House. Obama is among the Democrats who have suggested that Republican Donald Trump is racist in calling for a ban on Muslim immigration and curbs on illegal Mexican immigration.
Obama alluded to Trump again on Thursday, although not by name.
"Muslim-Americans and all Americans have to reject hatred. Muslim-Americans and all Americans have to reject discrimination. Muslim-Americans and all Americans have to answer those who would peddle hate or suggest that somehow their interpretations of their faith justify violence."
Obama said it's time to "rededicate ourselves to make sure that no American feels isolated. Or second class citizens."
At Thursday's White House press briefing, spokesman Josh Earnest was asked about the timing on the Mexican president's visit, coming as it does one day after Trump accepted his party's presidential nomination:
"Well, listen, I think all of you have made conclusions about the starkly different approach that President Obama has taken to a wide range of issues than the agenda that's being put forward by the Republican nominee.
"So I think it's fair to say that almost anything that President Obama did on Friday would be viewed as a sharp contrast to the agenda that's being put forward by the other side," Earnest said.