Image copyright Getty Images Image caption "I regret the word I used... and am very sorry," Maher said the following day

Comedian Bill Maher has apologised for using a racial slur on live television.

The host of "Real Time with Bill Maher" on HBO used a derogatory term for African-Americans while interviewing Nebraska Senator Ben Sasse.

The "joke" prompted a huge backlash, particularly on social media. Maher said he used the slur in the "banter of a live moment".

"The word was offensive and I regret saying it and am very sorry," he said in a statement released the next day.

The controversy arose during a segment of the show when Maher was interviewing the Republican Senator Ben Sasse.

This story contains language that readers may find offensive.

Image copyright Twitter Image caption Grammy-winning musician Chance the Rapper was among Maher's critics

When Maher said he should visit Nebraska more, the senator quipped: "You're welcome - we'd love to have you work in the fields with us."

"Work in the fields?" Maher replied. "Senator, I'm a house nigger," he said.

The comedian immediately backpedalled as the remark was met with a muted response from the audience.

"No, it's... it's a joke," he said, turning to the crowd.

The controversy quickly became a national trending topic on social media in the United States.

The interview continued without further interruption, but Senator Sasse later tweeted that he wished he'd been "quick enough" to challenge Maher.

"Free speech comes with a responsibility to speak up when folks use that word. Me just cringing last night wasn't good enough," he said.

Maher's network, HBO, also criticised his "joke" as "completely inexcusable and tasteless," and said the network would edit it out from re-runs of the show.

Later, Maher released a statement to the press.

"Friday nights are always my worst night of sleep because I'm up reflecting on the things I should or shouldn't have said on my live show," he said.

"Last night was a particularly long night as I regret the word I used in the banter of a live moment. The word was offensive and I regret saying it and am very sorry."

In a 2015 interview with Variety magazine, Maher acknowledged the risk he takes in going live, rather than pre-recording like some of his television rivals.

"Live on tape means 'not live,' of course. It was live at some point. The difference with our show is it is 'live' live," he said.

"As I'm saying it, you are seeing it. It does add an extra, kind of tightrope element to it, because you can't take anything back or editorially fudge it. It is what it is."