This story was updated Aug. 4 at 5 p.m. ET with news of the police officer's resignation.

A Florida police officer resigned on Tuesday one week after the release of a video captured him throwing peanuts at a homeless man.

See also: Sandra Bland was absolutely right to protest violent male authority

Andrew Halpin, the Sarasota Police Officer, handed his commander a letter that read “I hereby resign for personal reasons effective immediately" 15 minutes before he was due to be interviewed by Sarasota Police Department Internal Affairs about the video, the department said in a news release.

A video of the incident had prompted an investigation, according to local reports, into the dehumanizing way the officer appeared to have treated the man.

The man, Randy Miller, was intoxicated and handcuffed as he was being booked in the Sarasota County jail earlier this month.

Halpin can be seen laughing in the background; he later kicks several peanuts across the floor at Miller. Three other police officers watch as the incident unfolds.

Local news outlet the Herald-Tribune posted footage of the incident last Monday. The newspaper also reported a source familiar with Miller's arrest said Halpin was giving the homeless man "dog commands" as he threw peanuts at him.

Sarasota Police Chief Bernadette DiPino had told theHerald-Tribune that the police officer had been suspended.

"Based on the actions in the video, I immediately initiated an internal investigation on Officer Halpin," DiPino said. "I'm disappointed in what I observed in the video, and placed the officer on administrative leave, pending the outcome of the investigation."

On Tuesday, after Halpin resigned, DiPino said, “We take allegations of this matter seriously and this one incident does not reflect upon the professionalism of the men and women who work hard to uphold the public trust of the Sarasota Police Department.

He added: "The behavior I saw on that video was unacceptable however Mr. Halpin chose to resign before providing us with his side of the story and before our investigation was completed. I expect our Officers to uphold the highest levels of ethical behavior and treat all citizens with dignity and respect while serving our community. We will continue to build and maintain trust with our citizens and community partners."