According to multiple outlets including NBC News, Spencer, 43, gave his resignation to David Ralston, the Georgia House Speaker, writing, “This email/letter is to serve as an official resignation notice to your office that I will be resigning my post.”

Get push notifications with news, features and more.

CNN reported that Spencer said his resignation will take effect on July 31.

On last Sunday’s episode of the Showtime series, Spencer screamed the N-word, pulled down his pants, mocked Chinese accents, and practiced taking an illicit photograph of a person in a burqa. Cohen, 46, was pretending to be an anti-terror expert training Spencer to confront terrorists.

“I’ll touch you with my buttocks,” Spencer yelled during the so-called training session as he ran backwards with his pants down. “You better drop the gun, or I’ll touch you. USA!”

On Monday, The Washington Post’s Steven Zeitchik tweeted out a statement from Spencer in which he initially refused to resign. Spencer wrote, “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.”

In the statement, Spencer blamed his actions on his “state of mind” at the time. He said that death threats he received after advocating for a ban on Muslim women wearing veils in public and his unease following the 2017 shooting at Congressional baseball practice had rattled him.

“I deeply regret the language I used at his request as well as my participation in the ‘class’ in general,” Spencer said. “If I had not been so distracted by my fears, I never would have agreed to participate in the first place.”

Earlier in the week, Georgia politicians called for his resignation. Governor Nathan Deal tweeted, “The actions and language used by Jason Spencer are appalling and offensive. There is no excuse for this type of behavior, ever, and I am saddened and disgusted by it.”

The Hill noted that Ralston said, “Representative Spencer has disgraced himself and should resign immediately.”

Spencer previously made news in August 2017 when he said that people who want to remove Confederate-era statues might “go missing.” He later said in a statement that he regretted his “choice of words” and claimed that he was trying to warn “that there really are people who would harm others over the issue.”