Crime doesn't pay - especially when you're supposed to be working for the other side.

Authorities say a police officer who worked for the Bonifay Police Department, located in the Florida panhandle, was arrested after allegedly selling opioids out of his marked squad car while in uniform.

Officer Dwayne White was arrested while at the Bonifay Police Department by agents from the Florida Department of Law Enforcement, authorities said.

The FDLE began its investigation of White last month after the Holmes County Sheriff's Office referred their suspicions to them. Undercover agents made a controlled purchase of opioid tablets from White while he was in uniform in his marked squad car.

White also allegedly used his personal cell phone for sales.

The officer was charged with selling a controlled substance and unlawful use of a two-way communications device. He is currently being held in the Walton County Jail.

Photo: Walton County Sheriff's Office