It was the shot he fired into New Orleans police Officer Troy Pichon’s thigh during a chase in Central City in October that resulted in Michael Dabney’s conviction last week on charges of attempted first-degree murder and possession of a firearm as a felon, but it was his mile-long rap sheet that ensured he would spend the rest of his life behind bars.

Orleans Parish Criminal District Court Judge Karen Herman on Monday sentenced Dabney, 35, to three life terms with no possibility of parole under the state’s habitual-offender law. The sentences will run concurrently, she said.

Dabney was sentenced last week to 50 years in prison, but that was increased Monday when prosecutors moved to have him jailed for life because of his history of violent and drug-related crimes.

Dabney’s rap sheet includes more than 20 arrests, beginning when he was booked on charges of armed robbery and first-degree murder at age 16 in 1995. He pleaded guilty to the armed robbery charge and was sentenced to seven years behind bars.

It’s unclear when he was released, but in 1999, he was arrested on charges of possession of heroin with intent to distribute and received a five-year sentence.

Between 2006 and 2013, Dabney racked up a constellation of state and municipal charges, including aggravated burglary, domestic violence, gun charges, possession of stolen property, possessing contraband in jail and battery charges stemming from numerous incidents.

He was sentenced in August 2010 to more than four years in prison, including time already served, on charges related to possession of cocaine and possession of heroin.

A February 2011 arrest on aggravated and second-degree battery charges — crimes that apparently occurred while he was in prison on the drug charges — resulted in another 30-month sentence.

Dabney was released from Orleans Parish Prison on April 27, 2013, after he posted a bond for a second-degree battery charge for which he was arrested on Sept. 26, 2012, according to Sheriff’s Office spokesman Philip Stelly.

According to a Sheriff’s Office report, the arrested stemmed from a 2011 incident in which Dabney struck another inmate with a metal spoon before stabbing him five times in the torso.

Just six months elapsed after his release from prison before Dabney once again ran afoul of the law.

Pichon and his partner, Sgt. Eric Gillard, were patrolling Central City about 9:20 p.m. Oct. 28 when they came across Dabney, who they said appeared to be hiding something in his waistband. When the officers tried to stop him near Third and La Salle streets, he fled. While they were chasing him, he pulled a gun and began to fire, striking Pichon once in the thigh.

Dabney was found hours later hiding under a house in the 2300 block of Third Street by a K-9 officer named Bo. He had stripped off most of his clothes and was caked in mud, according to police.

During a three-day trial, Dabney’s attorneys pointed to Pichon’s admitted acquaintance with the defendant’s sister, and they used text messages between the two to claim the officer was having sex with her. They suggested that Pichon was harassing Dabney, to the point of firing on the parolee as he fled in fear down the street.

Dabney’s lawyers alleged the bullet that hit Pichon actually came from a spare gun kept by Gillard, whom they said wounded him by accident as Dabney fled.

That argument didn’t fly with jurors or Herman, who chastised Dabney’s attorneys for their attempt to impugn the officers.

“I find it most offensive to me that Officer Pichon had his reputation dragged through the mud the way he did,” Herman said.

She also lit into Dabney for his actions on the night of the shooting, calling it “the highest level of disregard for humanity that I’ve seen in a long time.”