OKLAHOMA CITY — Video of an Oklahoma detention officer who quit when he wasn’t allowed to take a knee with protesters has gone viral on social media.

“Take my badge, and I won’t come back,” said the unidentified officer.

The Oklahoma County Sheriff’s Office said the officer was needed Saturday to guard inmates inside the jail as a protest suddenly turned violent, reported KOCO.

“Protesters who really turned into rioters tried to breach the jail, set one of our vans on fire, and were knocking out windows,” said Mark Meyers, with the Oklahoma County Sheriff’s Office.

The deputies needed backup to hold back the crowd.

“We had jailers, detention officers here, and it was really an all hands-on deck,” said Meyers.

The detention officer, who didn’t want to be identified, was asked to help protect the jail until trained deputies could arrive.

“Yesterday, my life was on the line, and you had me out here on shifts,” the unidentified officer said Sunday.

According to officials, the detention officer saw deputies and other law enforcement officers take a knee and interact peacefully with some of the protesters Sunday.

“So, when you had me on shifts, ya’ll told me I couldn’t take a knee. So today, I’m going to take a knee, and he said, ‘No, you can’t take a knee,’” said the detention officer.

Said Meyers: “This individual is a detention officer, and if our detention officers decided they want to walk outside and leave the inmates to themselves, that makes no sense.”

The Sheriff’s Department said if employees want to protest or take a knee with protesters, there is another way.

“Take the day off,” said Meyers.

Said the detention officer: “I won’t come back, here I am protesting.”

The video has been seen hundreds of times on social media, KOCO reported.