The man who shot and killed two people during a Mardi Gras parade in New Orleans has pleaded guilty and was sentenced to 45 years in prison.

Media outlets report 20-year-old John Hicks avoided a life sentence by pleading guilty Monday to two counts of manslaughter, instead of the murder charges he was facing. He also pleaded guilty to one count of obstruction of justice, and carrying a firearm on a parade route.

Hicks shot and killed 21-year-old Peter Dabney and 22-year-old Ivan Williams during the St. Charles Avenue Mardi Gras Parade on Feb. 12, 2015. Police said in an arrest warrant that Hicks confessed to the shooting and that he had been in a "verbal altercation that turned physical."

On Monday, Hicks apologized to the families of the victims.