YORK, Pa. (AP) — A teenager accused of endangering thousands by shooting two men outside a high school football game in central Pennsylvania almost two years ago has been freed after pleading guilty to lesser charges.

Now-17-year-old Stephon Brown of Reading pleaded guilty Tuesday to possession of a firearm by a minor, reckless endangerment and criminal mischief. He was sentenced to about a year but credited for 663 days served and ordered released.

York police said he shot two men in the parking lot outside William Penn High School's home opener in September 2016.

Brown was charged with aggravated assault, firearms counts and 2,000 reckless endangerment counts due to the crowd at the game. Senior Deputy Prosecutor Dave Maisch said the two men shot "didn't give sufficient cooperation for us to proceed to trial."