ROMULUS (AP) – Former Detroit deputy mayor Anthony Adams has pleaded guilty to having a gun at Detroit Metropolitan Airport.

As part of a deal, though, Adams is eligible to have his record cleared if he pays court fees and stays out of trouble for a year.

READ MORE: Ford, One of Many Automakers Under Investigation Over Use of Recalled Takata Airbag Inflators

He made the plea Thursday in Romulus District Court to a charge of possessing a weapon in a sterile area of the airport.

Prosecutors have said a security X-ray machine at the airport west of Detroit detected the gun on Oct. 18.

READ MORE: Ford’s Flat Rock Plant Returns To Full Production After Gas Leak

Adams is a lawyer and served as deputy mayor during Kwame Kilpatrick’s tenure as mayor. He resigned last year as Detroit school board president.

According to the Detroit Free Press, Adams told authorities he forgot the gun was in the bag.

MORE NEWS: African World Festival Vendors in Detroit Told To Pack Up Over Permit Issues

(© Copyright 2012 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)