LAFAYETTE, La. (AP) — A former sheriff's deputy has pleaded guilty to federal charges of unauthorized use of an FBI database to check the criminal history of two people for non-law enforcement purposes.

The Advocate reports 42-year-old Chad Hazelwood faces up to two years in prison after admitting on Wednesday to two misdemeanor counts of exceeding authorized computer access.

U.S. Attorney Stephanie Finley did not give details on why Hazelwood was checking their backgrounds but said he accessed the FBI database "for non-law enforcement purposes."

Hazelwood worked as a Vermilion Parish Sheriff's Office deputy from 2006 to 2011.

He worked as an Iberia Parish sheriff's deputy from Nov. 4, 2011, to July 16, 2012.

Hazelwood also worked for several years with the New Iberia Police Department.