BUFFALO, N.Y. (WIVB) — A Rochester man has pleaded guilty to attempted criminal possession of a weapon after prosecutors say he had a gun at an anti-violence event.

According to the Erie County District Attorney’s office, Buffalo police saw 19-year-old Amauri Smith walking on Jefferson Avenue near Glenwood “with what appeared to be a gun in the pocket of his shorts.” They said this took place on June 11 during the “March for Our Lives” event.

“Officers confronted the defendant and recovered an illegal, loaded handgun from the defendant’s pocket,” the DA’s office said.

When Smith, now 20, is sentenced on Feb. 10, he could spend up to seven years in prison. He’s currently free on $20,000 bail.