NEW ORLEANS — A 24-year-old New Orleans man was sentenced to 38 years in prison Monday for shooting his ex-girlfriend and her new boyfriend in the head, leaving the woman unresponsive and the man blind.

Nicholas Collor pleaded guilty after prosecutors agreed not to ask for sentencing as a repeat offender, Orleans Parish District Attorney Leon Cannizzaro said in a news release.

Collor pleaded guilty to two counts of attempted first-degree murder and single counts of simple assault and possessing a firearm after a felony conviction.

“We are pleased that this very violent offender has been taken off the streets for such a significant number of years,” Cannizzaro said. “This was a despicable attack by someone with a history of domestic violence who was never again supposed to possess a firearm, but who nevertheless used a gun while in a jealous rage.”

The woman he shot last summer is in rehabilitation for brain trauma, Cannizzaro spokesman Ken Daley said in an email.

Collor was on probation in a domestic abuse-related case when he kicked in the woman’s apartment door on Aug. 20, authorities said.

He had been charged with three counts of domestic abuse and four of endangering children in the earlier case, but pleaded guilty in September 2016 to seven counts of aggravated assault with a firearm.

The judge in that case suspended a five-year sentence and put Collar on probation for five years.