The sheriff of an Arkansas Delta county resigned Friday under pressure after a recording of a man identified as him delivering a racist rant went viral.

Arkansas County Sheriff Todd Wright resigned at the request of the county’s Quorum Court after the Pine Bluff Commercial reported a five-minute audio recording circulated on Facebook this week. The recording is of a man who uses a racial slur nine times after becoming upset that a woman he was with spoke to a Black person in a grocery store. Throughout, the woman refers to the man as “Todd.”

On the recording, Wright can be heard calling the Black man a racial slur about nine times, according to an NBC News report.

County Judge Thomas Best, the county’s top elected administrator, said the Quorum Court decided Thursday to ask for Wright’s resignation after the recording began circulating on Facebook the day before.

Wright apologized at the court meeting for any offense his recorded remarks may have caused and said he made those comments in the heat of the moment when he was “upset over certain things.”

“It saddens me that anyone would disrespect God’s creation in this manner,” Best said. “No way will I condone this action from anyone.”

The mother of the man Wright was referring to said she was shocked the sheriff would call her hardworking son “names like that” multiple times.

“I don’t appreciate you calling him or anybody else the N-word,” she said. “If you got problems, don’t bring them to work.”

Chief Deputy Randy Bateman will serve as sheriff until a replacement is appointed or a special election is held, Best said.

Wright had been with the sheriff’s office for 26 years, the last four as the elected sheriff.