President Barack Obama delivering a statement on U.S.-Iran relations, including the release of the American hostages that were held in Iran, in the cabinet room of the White House in Washington, D.C., Jan. 17, 2016. (Aude Guerrucci-Pool/Getty Images)

WASHINGTON (JTA) — An Orthodox Union official said a visit by President Barack Obama to a Baltimore mosque was an appropriate message embracing diversity.

“George W. Bush went to a mosque a few days after 9-11 to send the message the United States should stand by principles of religious diversity and religious freedom for all faiths,” Nathan Diament, the umbrella body’s Washington director, told JTA in an interview. “It’s appropriate for President Obama to send a similar message just as he sends to synagogues and churches.”

Obama visited the Islamic Society of Baltimore on Wednesday – his first to a U.S. mosque during his presidency — in a pointed bid to counter anti-Muslim rhetoric by Donald Trump, the billionaire real estate magnate who is one of the front-runners in the race for the Republican presidential nomination.

“An attack on one religion is an attack on all religions,” Obama said in his remarks.

Diament noted that Obama’s visit comes on the eve of his annual address to the National Prayer Breakfast, which is organized by a Christian group. Last May, Jewish American Heritage Month, Obama delivered remarks at Adas Israel, the oldest Jewish congregation in Washington, D.C.