A Palm Harbor man has been arrested after the Pinellas County Sheriff’s Office said he admitted to viewing child pornography while taking a pre-employment polygraph screening for a job with the Sheriff’s Office.

Robert Luth, 29, was charged with five counts of possession of child pornography.

The Sheriff’s Office said it began investigating Aug. 17 when Luth made the admission. Detectives said they obtained a search warrant for Luth’s cellphone and found multiple files of child pornography on the device. He was arrested on Aug. 30 and taken to the Pinellas County Jail.