LACKAWANNA, N.Y. -- A Lackawanna student faces prison time after admitting to bringing a loaded handgun to school, earlier this year. 

District Attorney's office officials say 20-year-old Devonte Ridgeway pleaded guilty to criminal possession of a weapon in Erie County Court Thursday. 

Back in January, he set off a metal detector at Baker Hall School. 

Staff searched his backpack and found a loaded gun hidden in a sneaker inside the bag. 

Ridgeway ran off, but was arrested in Holy Cross Cemetery. 

He faces up to 15 years in prison when he's sentenced next month.