Claiming that the majority of a Muslim population share the beliefs of radical Islamists is racist and similar to calling Jews “shifty,” actor Ben Affleck said on Friday during a guest appearance on HBO’s Real Time with Bill Maher.

“It’s just an ugly thing to say. It’s gross, it’s racist,” he said. “It’s like saying: ‘Oh you shifty Jew.'”

The Gone Girl star blasted Maher and his co-panelists during a heated discussion on Islam in which the religion was compared to the mafia and called “the motherload of bad decisions.”

The conversation started with author Sam Harris saying: “The crucial point of confusion is we have been sold this meme of Islamophobia – where every criticism of the doctrine of Islam is conflated with bigotry towards Muslims as people. Which is intellectually ridiculous.”

Related coverage Pompeo: Iran Should Know There is a Cost to Malign Activity ‘Wherever It Takes Place’ JNS.org - “Hi, this is Mike,” US Secretary of State Mike Pompeo said right at the start of my phone...

Affleck, annoyed by the comment, asked Harris, “You are saying that Islamophobia is not a real thing?”

Before the latter could respond, Maher interjected, asking the actor, “Why are you getting so hostile about this?”

After Affleck called the generalization “racist,” Maher disputed his claim, saying, “But it’s so not. You are not listening to what we are saying.” Harris then told the Gone Girl star, “Ben, we have to be able to criticize bad ideas and Islam is the motherload of bad ideas.”

Maher agreed with Harris saying, “That’s just a fact,” but an appalled Affleck responded, “Jesus Christ. It’s not a fact. It’s an ugly thing to say.”

“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?” Affleck said.

“You’re stereotyping,” the actor told Harris. He added, “The people who actually believe that you should murder someone if you dishonor the Islamic faith is not with the majority of Muslims at all.”

Maher responded: “One reason they (other views) don’t get exposed is because they are afraid to speak out. Because it’s the only religion that acts like the Mafia. That will f***ing kill if you say the wrong thing, draw the wrong picture or write the wrong book.”

Looking for an explanation, Affleck then asked the panelists: “What is your answer? Is it just to condemn Islam? We’ve killed more Muslims than they have killed us by an awful lot. Yet somehow we are exempt from these things. Because they are not really a reflection of what we believe in.”

He then sarcastically concluded: “It was by accident, that’s how we invaded Iraq” and “I am explicitly telling you that I disagree with what you think.”

Watch the full conversation below:

[iframe width=”420″ height=”315″ src=”//www.youtube.com/embed/XduMMteTEbc” frameborder=”0″ allowfullscreen>]