President Barack Obama spoke out against religious prejudice Monday at a White House dinner celebrating the start of the Islamic holy month of Ramadan.

Several members of the diplomatic community, lawmakers and Muslim Americans were on hand for a traditional Iftar dinner, which follows daily fasting from dawn to sunset.

Right to practice

Obama said the Iftar dinner is a reminder of "the freedoms that bind us together as Americans," including the "inviolable right to practice our faiths freely." He recognized a number of young Muslim American activists in the audience, including Samantha Elauf, who successfully won a Supreme Court case to defend her right to wear a hijab, or headscarf, after she was rejected for a sales job at a retail clothing store.

WATCH: President hosts Iftar dinner

We are sorry, but this feature is currently not available

He condemned a number of recent deadly incidents involving religion, including last week's mass shooting at an African American church in Charleston, South Carolina. "When our values are threatened, we come together as one nation," the president said. "As Americans, we insist that nobody should be targeted because of who they are, or what they look like, who they love, how they worship. We stand united against these hateful acts."

Refugee crisis

Obama also recognized the refugee crisis triggered by the ongoing violent uprisings in the Middle East, as well as the plight of Myanmar's Rohingya Muslims escaping persecution in their country.

"So tonight, we keep in our prayers those who are suffering around the world, including those marking Ramadan in areas of conflict and deprivation and hunger. The people of Iraq and Syria as they push back on the barbarity of ISIL. The people of Yemen and Libya, who are seeking an end to ongoing violence and instability. Those fleeing war and hardship in boats across the Mediterranean. The people of Gaza, still recovering from last year’s conflict. The Rohingya in Myanmar, including migrants at sea, whose human rights must be upheld," he said.