Republican presidential candidate Herman Cain said Sunday that communities have a right to ban Islamic mosques.

Appearing on "Fox News Sunday," the former Godfather's Pizza CEO said protests and legal challenges to a planned mosque in Tennessee city are an example of local residents pushing back.

Cain said his view doesn't amount to religious discrimination because he says Muslims are trying to inject Shariah law into the U.S.

Shariah is a set of core principles that most Muslims recognize and a series of rulings from religious scholars. It covers many areas of life and different sects have different versions and interpretations of the code.

Asked if his view could lead any community to stand up in opposition to a proposed mosque, Cain replied, "They could say that." He pointed to opposition to the planned mosque in Murfreesboro, Tenn., as an example.

"Let's go back to the fundamental issue that the people are basically saying that they are objecting to," Cain said. "They are objecting to the fact that Islam is both religion and (a) set of laws, Shariah law. That's the difference between any one of our other traditional religions where it's just about religious purposes.

"The people in the community know best. And I happen to side with the people in the community."

Cain's comments were denounced as "unconstitutional and un-American" by a spokesman for the Washington-based Council on American-Islamic Relations.

"It's clear that Herman Cain has decided that he will score political points every time he bashes the Muslim community or its constitutional rights," council spokesman Ibrahim Hooper said in a phone interview.

Cain previously stirred controversy by saying that he would not want a Muslim bent on killing Americans in his administration.

Campaigning in Murfreesboro last week, Cain sided with mosque opponents.

"I happen to also know that it's not just about a religious mosque," he said Sunday. "There are other things going on based upon talking to the people closest to the problem. It's not a mosque for religious purposes. This is what the people are objecting to."

Hooper called the remarks "utter nonsense," saying Cain "seems to have hitched his wagon to the most extreme anti-Muslim bigots out there." He called on Republican leaders to repudiate Cain's comments.

"Each time you have someone who is regarded as a mainstream political leader expressing these kind of hate-filled views, it just fans the flames of anti-Muslim bigotry nationwide," he said. "And it gives legitimacy to intolerance and hatred. And he, of all people, should realize this, being African-American."

In Murfreesboro, the future new mosque has been the subject of protests and counter-protests in the city about 35 miles southeast of Nashville.

Opponents have used the hearings to argue that the mosque is part of a plot to expand Islamic extremism in the U.S.

"It is sad to hear these words coming from a GOP presidential candidate, who is not only supposed to believe in but should also uphold the US constitution," Bahloul said. "Mr. Cain is encouraged to educate himself about the first amendment and learn more about our peaceful and productive Muslim community in Murfreesboro."

Stephen Fotopulos, executive director of the Tennessee Immigrant and Refugee Rights Coalition, said Cain's comments "demonstrate a profound misunderstanding of the U.S. Constitution."

"And it's baffling that a man with designs on becoming the leader of this nation would so callously alienate over 3 million of its citizens," Fotopulos said.