A US legislator who exposed himself and yelled racial slurs on British star Sacha Baron Cohen’s new TV series will resign, according to officials

Jason Spencer will step down at the end of the month, a spokesman for Georgia House speaker David Ralston told the Atlanta Journal-Constitution.

In Sunday night’s broadcast of Cohen’s Showtime series Who Is America? Cohen poses as an Israeli military expert who persuades Mr Spencer to take part in several outlandish exercises. The legislator is told they’re making a counter-terrorism video.

Mr Spencer repeatedly shouts a racial slur for black people after Cohen tells him the tactic is useful for drawing bystanders’ attention to an unfolding attack.

He also drops his trousers, then his underwear, before backing his exposed rear end towards Cohen while shouting “USA!” and “America!” after Cohen told him the move would incite fear in homophobic jihadists.

The segment also shows Mr Spencer speaking with a mock Asian accent while pretending to use a selfie-stick to surreptitiously insert a camera phone under a Muslim woman’s burqa.

Mr Ralston and others called for his immediate resignation.

Jason Spencer (Alyssa Pointer/Atlanta Journal-Constitution/AP)

In a statement on Monday, Mr Spencer apologised for the “ridiculously ugly episode” but initially refused to step down.

He lost the Republican primary contest in May, but he could have remained in public office until the November election.