A St. Petersburg police officer has resigned after the department said cell phone video showed him using a racial slur.

The footage came to the department's attention overnight, and supervisors met with Probationary Officer Michael Naples on Tuesday -- leading to his abrupt resignation.

The specific content of the video was not immediately clear, nor was it clear where the footage was recorded.

St. Petersburg Police Chief Anthony Holloway said Naples used the slur during a confrontation Monday night with a pizza delivery man.

Holloway said Levonte Daniels had struck a vehicle with a fire extinguisher. Daniels admitted to the act and was issued a notice to attend a diversion program. Daniels then started recording.

As the officer was walking away, Daniels shouted at Naples, "You're a piece of s--t!"

Naples is heard responding, "You're a piece of s--t (N-word)!"

Daniels called the police and asked to speak to a supervisor. A police lieutenant she would send a sergeant out to talk to the caller, but the caller said he didn't want to talk to an officer and hung up.

The lieutenant called Naples in, and Naples admitted to using the slur, Holloway said.

"Yes, I'm sorry. I did use profanity. I did use a racial slur," Holloway quoted Naples.

In the meantime, Daniels posted video of the confrontation on Facebook.

Holloway said police did not see the video until Tuesday morning, and the investigation had already begun by then.

The chief said Naples would have been fired if he had not resigned.

Naples had only been with the department for 11 months and was still on probation. He was sworn in on July 10, 2017.

Make it easy to keep up-to-date with more stories like this. Download the 10 News app now.

Have a news tip? Email tips@wtsp.com, visit our Facebook page or Twitter feed.