Actor Ben Affleck clashed with television comedian and political commentator Bill Maher and his guest and author Sam Harris. The confrontation arose during a discussion about Islam when Maher and Harris called Islam a "mother load of bad ideas."

The trio was holding the discussion on HBO's "Real Time with Bill Maher" on Friday about whether large numbers of the Muslim population share extremist views. This lead to Affleck responding, "It's just an ugly thing to say. It's gross, it's racist. It's like saying, 'Oh you shifty Jew.'"

The Daily Mail reports that the conversation arose from Harris promoting his book "Waking Up."

"Liberals have failed on the topic of theocracy. They'll criticize white theocracy, they'll criticize Christianity. They still get agitated over the abortion clinic bombing that happened in 1984," Harris said.

"The crucial point of confusion is we have been sold this meme of Islamaphobia -- where every criticism of the doctrine of Islam is conflated with bigotry toward Muslims as people. Which is intellectually ridiculous."

Affleck said, "Are you the person who understands the officially codified doctrine of Islam?"

The trio went back and forth as Maher and Harris argued that the majority of Muslims believe that someone should die if they leave Islam along with other extreme beliefs.

Affleck contested that the small number of extremist should not be used to judge the millions of followers.

"How about the more than a billion people who aren't fanatical, who don't punish women, who just want to go to school, have some sandwiches, and don't do any of the things you say all Muslims do?"

The Telegraph reported that political analyst Michael Steele attempted to support Affleck by saying that the majority of Muslim opposition to Muslim extremism goes under reported.

"It's the only religion that acts like the Mafia," Maher said. "That will f*cking kill if you say the wrong thing, draw the wrong picture or write the wrong book."

The debate continued for about 10 minutes until Maher moved on saying that they would not see eye to eye on the issue.

E Online reported Affleck has been active in politics for some time and most recently made headlines when he testified in front of a Senate panel in support of the Democratic Republic of Congo.