Comedian Bill Maher apologized on the air Friday night during his "Real Time" show for uttering a racial slur during last week's program, admitting that his use of the N-word "has caused pain," Entertainment Weekly reported.

Maher also discussed the incident with author/sociology professor Michael Eric Dyson and rapper Ice Cube.

"Thank you for letting a sinner in your midst,” Maher told his audience. “Michael Eric Dyson will be here shortly to take me to the woodshed."

Maher asked Dyson, a longtime friend, “to school me. I did a bad thing."

"There is a lot of BS apologizing in America, and I am against that," Maher said. But apologizing for using a racial slur was appropriate because “for black folks, that word — I don’t care who you are — has caused pain. I’m not here to do that.

"It doesn’t matter that it wasn’t said in malice if it brought back pain to people,” Maher said. “And that’s why I apologized freely, and I reiterate it tonight. That’s sincere.”

Cube challenged Maher later in the show, Entertainment Weekly reported.

"I love your show, you’ve got a great show," he said. "But you be bucking up against that line a little bit. You know, you’ve got a lot of black jokes."

When Maher said that those jokes are aimed at racists, Cube retorted, "Sometimes you sound like a redneck trucker."

"I think we need to get to the root of the psyche, because I think there’s a lot of guys out there who cross the line because they’re a little too familiar, or they think they’re too familiar," Ice Cube said.