(CNN) Jason Spencer, a Georgia state lawmaker who dropped his trousers and repeatedly used the "n-word" on an episode of the Showtime series "Who Is America?"
His resignation will take effect on July 31, according to a letter he submitted to Georgia House Speaker David Ralston.
Spencer told Cohen's character, "I don't call it a burqa ban, I call it an anti-masking statute.".
Ralston called Spencer's actions and language "reprehensible" in a statement provided to CNN, and called for him to resign, saying: "Georgia is better than this.".
"I deeply regret the language I used at (Cohen's) request as well as my participation in the 'class' in general.
I have been inform elected official & all-round mensch I meet, Jason Spencer, have somehow been portray in bad light by Showtime.
He has served four terms and is still in office, but was defeated by political newcomer Steven Sainz in the Republican primary in May. »