The discussion started when Harris, an author and co-founder of Project Reason, argued that liberals are afraid to criticize Islam for its treatment of women and gay people.
Maher took things a step further, stating: "Islam at the moment is the motherlode of bad ideas."
That drew an exasperated "Jesus Christ" from Affleck, who told Maher and Harris that their statements about Muslims were "gross. It's racist. It's like saying 'a shifty Jew...'"
The Gone Girl star noted that members of ISIS and other jihadists are not representative of Muslims overall. "How about the more than a billion people who aren't fanatical, who don't punish women, who just want to go to school ... ?" he asked.
Maher eventually put an end to the discussion once it became clear that neither side was going to convince the other, but not before the argument turned heated. "It's the only religion that acts like the Mafia, that will f---ing kill you if you say the wrong thing, draw the wrong picture or write the wrong book," Maher said at one point.
Watch a video of the panel below. What do you think of Maher's and Affleck's comments?