FARMINGTON, Maine — A local man pleaded guilty Thursday to walking around the downtown area with a toy gun that appeared to be a real weapon tucked into his shorts in August.

John Cushman, 20, of Farmington pleaded guilty to a misdemeanor charge of carrying a concealed weapon in Franklin County District Court.

Judge Susan Oram accepted the plea and delayed sentencing until October 2014.

Cushman is required to do tasks outlined in an agreement with the state, including 20 hours of public service. He also is prohibited from possessing weapons.

Cushman originally was charged with terrorizing, but that charge was reduced in September after the case was reviewed.

People in the downtown area became scared when seeing Cushman with what they thought was a real gun in the waistband of his pants and hearing comments he made that led them to secure themselves in a building, police previously said.

An employee at the Homestead Bakery called police and The Roost employees to warn them about a man walking around town with a gun. The Roost employees voluntarily locked down the business with patrons still inside as a precaution.

When someone is wearing something on their person that looks like a weapon or they act like they have a weapon, they can be charged with carrying a concealed weapon, Assistant District Attorney Joshua Robbins previously said.

The toy gun was an Airsoft pistol, which had an orange ring to indicate that it was a toy.