Police arrested a convicted sex offender at a middle school, saying he walked into the building dressed as a police officer and carrying a 6-inch folding knife.

Authorities said Kyle Lamone, 25, was charged with unlawfully carrying a weapon on school grounds and impersonating a police officer.

Lamone had been in the building at least twice since Jan. 1, but Tuesday's incident was the first time he carried a weapon inside, Sgt. Daryl Noon said.

Lamone could face nearly 2 1/2 years in prison if convicted.

He previously was convicted of criminal sexual contact with a minor in 2000, according to court records.

Principal Anthony Smagacz said Lamone went to a classroom without checking in as a visitor. He said Lamone was trying to see a former teacher as students were leaving for the day. The visit was suspicious but not violent, he said.

The school's resource officer had researched Lamone after a previous visit and learned of his conviction.

Click here for the latest Crime headlines.