A man pleaded guilty to first-degree murder Thursday in the 2013 stabbing death of a 6-year-old girl whose body was found stuffed into a trash can that had been rolled up to a curb in a New Orleans suburb.

Matthew Flugence, 22, entered the plea at a hearing in Gretna and agreed to serve life in prison, avoiding a death sentence, Jefferson Parish District Attorney Paul Connick's office said in a news release.

Connick's office said the family of victim Ahlittia (ah-LIHT--ee-ah) North agreed with the plea deal.

"This outcome gives peace to Ahlittia's family who has been spared the painful experience of reliving the horrible events during the trial," Connick said.

As part of his plea, Flugence agreed to waive his appeal rights. He will not be eligible for probation, parole or a suspended sentence.

Ahlittia disappeared sometime after she was put to bed at her mother and stepfather's apartment in Harvey on the night of July 12, 2013. She had been missing for days when her body — with four stab wounds and multiple bruises — was found in the trash can near the apartment.

She had been the subject of an intensive search involving the Jefferson Parish Sheriff's Office, the FBI and other agencies. Sheriff Newell Normand said at the time that the search took twists and turns — what looked like blood spatters in one nearby building turned out to be paint. A pool of blood found near the girl's home was confirmed as Ahlittia's, but spent ammunition near the blood turned out to be unrelated to the case. Then, Normand said, the body was found in a trash can that had already been searched once.

Flugence, a nephew and neighbor of the girl's stepfather, emerged as a suspect and was captured a day later. Authorities said he confessed to stabbing the girl. His brother had been arrested earlier for withholding information in the case.