Republican presidential candidate Herman Cain apologized to Muslims on Wednesday in a statement sent to Politico.

"While I stand by my opposition to the interference of sharia law into the American legal system, I remain humble and contrite for any statements I have made that might have caused offense to Muslim Americans and their friends," he said. "I am truly sorry for any comments that may have betrayed my commitment to the U.S. Constitution and the freedom of religion guaranteed by it. Muslims, like all Americans, have the right to practice their faith freely and peacefully.”

The statement was issued after Cain met with a small group of Muslim leaders.

He had previously said that any community should be able to ban mosques because there is a big difference between Islam and "our other traditional religions."

"Islam combines church and state," Cain told Fox News' Chris Wallace during an interview. "They are using the church part of our First Amendment to infuse their mosque in that community and people in the community do not like it, they disagree with it. Sharia law is what they are trying to infuse."

In March, Cain also used Sharia law as an excuse for saying that he would not appoint a Muslim to his cabinet or as a federal judge.

During CNN's New Hampshire GOP debate in June, he tried to clarify his stance on appointing Muslims to government positions by saying that only the Muslims not "trying to kill us" should be in government.

"You have peaceful Muslims, then you have militant Muslims, those that are trying to kill us," Cain said. "I was thinking about the ones that were trying to kill us."