A Georgia lawmaker is resigning after yelling racial slurs and exposing himself on Sacha Baron Cohen’s TV show.

The office of state House Speaker David Ralston (R) told The Atlanta Journal Constitution that state Rep. Jason Spencer (R) had agreed to resign.

The newspaper noted that if Spencer had declined to step down, he would have faced potential repercussions.

ADVERTISEMENT

Legislators were reportedly considering ways to reprimand him after his appearance on Sunday night's episode of "Who Is America?" on Showtime.

Spencer faced repeated calls to resign after he repeatedly shouted the N-word after Cohen, who pretended to be an Israeli military expert and told the lawmaker that using the “forbidden” word would help ward off terrorists.

Spencer also partially pulls down his pants and chases Cohen with his buttocks exposed, yelling, “USA, motherf-----!”

Spencer quickly issued an apology after the show aired, calling it a "ridiculously ugly episode." But he stopped short of resigning, saying that “I recently lost my primary election, so I will not be eligible to hold office next term. Therefore, I will finish the remaining five months at my post and vacate my seat."

Spencer had previously threatened legal action against Showtime to prevent the cable network from airing the footage.

After the show aired, Ralston described Spencer's behavior as "reprehensible."

“Representative Spencer has disgraced himself and should resign immediately,” Ralston said in a statement. “Georgia is better than this.”

Georgia Gov. Nathan Deal (R) echoed those comments, saying he was "disgusted" by Spencer's actions.

Spencer was recently defeated in the GOP primary after serving four terms.