President Barack Obama was set on Wednesday to make his first visit to a U.S. mosque, a trip the White House said was aimed at countering rhetoric from Republicans on the presidential campaign trail exploiting some Americans' fears about Muslims.

In the trip to the Islamic Society of Baltimore, Obama wants to highlight the American right to freedom of religion for all, including Muslims, White House spokesman Josh Earnest said.

"We've seen an alarming willingness on the part of some Republicans to try to marginalise law-abiding, patriotic Muslim Americans. And it is offensive," Earnest told reporters.

Republican presidential front-runner Donald Trump called for a ban on Muslims entering the United States after a California couple who killed 14 people last December were described by authorities as radicalised Muslims inspired by Islamic State militants.

RELATED: Americans support Obama's contested immigration plan: poll

Republicans vying to be the party's candidate for the Nov. 8 presidential election also argued against Obama's plan to accept 10,000 refugees fleeing Syria's war, saying it raised national security risks.

Republican candidate Ben Carson has said Muslims were unfit for the presidency of the United States.

"It has been a transparent strategy on the part of Republicans to play on people’s anxieties, to target religious minorities to advance their political ambition," Earnest said.

Obama has called the comments a betrayal of American values, and said discrimination against Muslims "plays into the hands" of extremist groups like Islamic State.

Muslim civil rights leaders have expressed alarm about anti-Muslim backlash, pointing to recent incidents where vandals have thrown bacon and even a pig's severed heads at mosques.

Obama, who has visited mosques outside the United States on trips abroad, will first meet privately with a small group of Muslim community leaders before delivering remarks at the mosque at 12:05 p.m. ET.

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.