A Georgia state lawmaker who shouted racial slurs as part of a fake anti-terrorism training video filmed by the comedian Sacha Baron Cohen will resign from office, a spokesman for the Georgia house speaker said Tuesday night.

Since the episode of Baron Cohen’s Who is America? aired Sunday night, Rep. Jason Spencer had resisted increasingly loud calls for his resignation from the public and fellow legislators, saying he would remain in office as planned through the rest of his term.

But late Tuesday, a spokesman for Georgia House Speaker David Ralston told the Atlanta Journal-Constitution that Spencer would step down at the end of the month.

In the segment on Baron Cohen’s show, Spencer believed he was meeting with an Israeli expert, played by Baron Cohen in disguise, to film an anti-terrorism training video. Baron Cohen prompts Spencer to do an offensive impression of a Chinese tourist; take an upskirt photo of a woman in a burqa (to determine if she is a woman or a male terrorist); and scream the N-word repeatedly (to attract attention).

In one of the most humiliating moments from the episode, Spencer ran backward toward Baron Cohen with his pants pulled down and his buttocks exposed while screaming, “USA! USA!”—to frighten a potential terrorist with the threat of homosexuality, Baron Cohen explained. Spencer ended the segment by threatening to cut off the terrorist’s genitals, warning, “All you damn sand-n*****s over in the Middle East, we are tired of you coming to America.”

Spencer explained afterward that Baron Cohen had taken advantage of Spencer’s “paralyzing fear” that his family would be attacked, a fear he said had intensified after a gunman attacked members of Congress at a congressional baseball practice in June of last year.

In posing as an Israeli Agent, he pretended to offer self-defense exercises. As uncomfortable as I was to participate, I agreed to, understanding that these “techniques” were meant to help me and others fend off what I believe was an inevitable attack. My fears were so heightened at that time, I was not thinking clearly, not could I appreciate what I was agreeing to when I participated in his ‘class’. I was told I would be filmed as a ‘demonstration video’ to teach others the same skills in Israel. Sacha and his crew further lied to me, stating that I would be able to review and have final approval over any footage used. I deeply regret the language I used at this request as well as my participation in the ‘class’ in general. If I had not been so distracted by my fears, I never would have agreed to participate in the first place.

His fears began, he said, after he starting receiving death threats for introducing a bill meant effectively to ban burqas and niqabs. He also drew national attention for threatening that a black Democrat in Georgia who supported the removal of Confederate statues would not be “met with torches but something a lot more definitive.”

According to the Journal-Constitution, Republican leaders in Georgia had been searching for ways to discipline Spencer before his resignation, and some politicians were calling for a special session to kick him out of the Legislature. Spencer is in his fourth term, but he lost his primary in May and could not have been re-elected.