NEW ORLEANS (AP) — A 32-year-old New Orleans man has been sentenced to 514 years in prison for a botched and bloody holdup in 2007.

Anthony Martin testified that his gun went off during a struggle at a house where he had gone to buy marijuana. Prosecutors and witnesses said he was there to sell drugs and started shooting.

One man died; three were wounded. During a fight, Martin lost his pants, with ID and a credit card in the pockets.

Martin was arrested in Mississippi. He was convicted Aug. 24 after four mistrials.

The Times-Picayune reports that Criminal District Court Judge Frank Marullo sentenced Martin last week as a habitual offender, boosting sentences for manslaughter, attempted murder, attempted armed robbery, aggravated burglary and illegally discharging a firearm during a violent crime.