A Colorado man who posed as a police officer in an effort to confiscate pornography from an adult novelty store has pleaded guilty to impersonating a police officer.

Thirty-four-year-old Andrew Libby was sentenced Friday to two years of probation.

His lawyer, Kristi Sanders, says Libby was suffering from delusions when he entered the store last July, saying he was from the Longmont Police Department and needed to inspect pornographic DVDs to look for underage actors.

Sanders says Libby believed the store was involved in illegal activity that he needed to shut down.

Libby is barred from owning weapons or visiting the store during his probation. He also must get mental health treatment.