President Obama delivered remarks at a mosque in Baltimore on Wednesday afternoon, in the first visit to an American mosque he's made during his presidency.

His visit, which also included a roundtable with Muslim community members, ws intended to "reaffirm the importance of religious freedom" to life in America, the White House says.

He opened by thanking Muslim-Americans for their service to their communities, before declaring the importance of religious tolerance in America.

"None of us can be silent. We can't be bystanders to bigotry," the president said in his speech at the Islamic Society of Baltimore. "And together, we've got to show that America truly protects all faiths."

And he spoke directly to young Muslims: "If you're ever wondering whether you fit in here, let me say it as clearly as I can, as President of the United States: You fit in here — right here."

The president has visited mosques in other countries, but had not previously visited any in the U.S., The Associated Press reports. The wire service notes that Wednesday's speech is one of several religiously themed visits he's making this winter.

"He is set to speak to the nation's Christian leaders at the annual National Prayer Breakfast on Thursday, and last week warned against the rise of religious intolerance during a ceremony at the Israeli Embassy," the AP writes.

Visiting a mosque to reiterate America's commitment to religious tolerance has a noteworthy precedent. Days after the terrorist attacks on Sept. 11, 2001, then-President George W. Bush visited the Islamic Center in Washington, D.C., to say that the intimidation of Muslims "should not and will not stand in America."

"The face of terror is not the true faith of Islam," Bush said. "That's not what Islam is all about. Islam is peace."

Obama's visit to the mosque in Baltimore comes amid heated rhetoric over Islam in America. Republican presidential candidate Donald Trump has called for a ban on Muslims entering the U.S., which was denounced by some Republican leaders.

Even setting aside such extreme proposals, many prominent Republicans and Democrats have very different approaches to rhetoric about Islam and terrorism. As NPR political reporter Jessica Taylor explained last November, Obama and the Democratic candidates all avoid referring to "radical Islam" or "Islamic extremism" when they're denouncing terrorism, preferring to call terrorists "extremists" or "jihadists." It's a careful tactic to draw a line between the religion of Islam and the actions of terrorists.

Republicans such as Ted Cruz and Marco Rubio have criticized that linguistic choice, and called on the president to denounce "radical Islam."

A Pew report released today suggests Americans in general are deeply divided on the issue and, like their leaders, are split along political lines.

Two-thirds of Republicans and Republican-leaning poll respondents said the next president should "speak bluntly, even if critical of Islam as a whole."

Seventy percent of Democrats and Democratic-leaning respondents said the next president should "be careful not to criticize Islam as a whole."

Overall, more people would like the next president to avoid criticizing Islam in general — 50 percent are so inclined, while 40 percent overall would prefer bluntness even if it involves criticism.

Approximately half of the 2,009 respondents said they personally know a Muslim. Pew has previously estimated there are about 2.75 million Muslims in the U.S., or less than 1 percent of the population.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.