PITTSBURGH (AP) – A man has been sentenced to 20 to 50 years in prison in the death of a man gunned down while waiting outside a western Pennsylvania market for a submarine sandwich order.

The Pittsburgh Post-Gazette reports that 21-year-old Brandon Cerra pleaded guilty to third-degree murder minutes before his Allegheny County jury trial was scheduled to begin Wednesday.

He was charged in the slaying of 30-year-old Michael Freeman Jr. outside Hanini’s Market in the Brighton Heights neighborhood of Pittsburgh in September 2017.

Police said he and his girlfriend had just ordered sandwiches and stepped outside to wait when the gunfire started.

Cerra also pleaded guilty to witness intimidation and weapon charges. Defense attorney Rachael Santoriella said her client “made a very difficult decision, a very mature decision, a smart decision.”

(Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)