Ali G comedian Sacha Baron Cohen has asked a US federal judge to dismiss a defamation lawsuit filed by American politician Roy Moore.

The lawsuit is over a television segment that lampooned Moore in the wake of sexual misconduct allegations.

Lawyers representing the British comic wrote last week in a joint court filing that Moore signed an agreement waiving all legal claims before appearing on the Who Is America? TV show.

They said in the agreement that Moore waived claims related to the programme and anyone associated with it. They also said the segment was satire and is protected under the First Amendment right on freedom of speech in the US constitution.

“This lawsuit conflicts directly with the long tradition of First Amendment protection for political parody and satire of public figures — especially where the satirical work ‘could not reasonably have been interpreted as stating actual facts about the public figure involved,'” lawyers wrote.

The segment ran after Moore faced misconduct accusations during his bid to run for the US Senate in Alabama in 2017. He has denied the allegations and is running for Senate again in 2020.

Moore said he was told he was receiving an award for supporting Israel when he agreed to appear on the show. Instead, Baron Cohen lampooned him as a possible paedophile.

Sacha Baron Cohen as Borat
Lawsuits filed against Baron Cohen over his film Borat have previously been thrown out (Ian West/PA)

In the segment, Baron Cohen appeared as faux counter-terrorism instructor “Colonel Erran Morad,” discussing bogus military technology, including a supposed paedophile detector. The device repeatedly beeped as it got near Moore, who sat stone-faced.

Moore argued that the waiver was fraudulently obtained because it did not disclose he was dealing with the comic.

Baron Cohen has faced past lawsuits over similar pranks, but those actions were thrown out because the individuals had signed releases.

In 2008, a New York judge threw out lawsuits brought by a driving instructor and two etiquette school teachers who said they were duped into appearing in the movie Borat in which Baron Cohen plays an awkward foreign journalist travelling the United States. The judge said they accepted money and signed agreements releasing the filmmakers from liability.

Moore agreed to accept 200 US dollars for the charity of his choice, according to the agreement.

Moore filed the lawsuit in Washington, DC, but it was moved to New York, where the agreement mandates that disputes would be heard.