MONTICELLO, Miss. — After 10 years of incarceration, and seven years after a jury sentenced him to die, 30-year-old Cory Maye will soon be going home. Mississippi Circuit Court Judge Prentiss Harrell signed a plea agreement Friday morning in which Maye pled guilty to manslaughter for the 2001 death of Prentiss, Mississippi, police officer Ron Jones, Jr.

Per the agreement, Harrell then sentenced Maye to 10 years in prison, time he has now already served. Maye will be taken to Rankin County, Mississippi, for processing and some procedural work. He is expected to be released within days.

Maye’s story, a haunting tale about race, the rural south, the excesses of the drug war, the inequities of the criminal justice system and a father’s instincts to protect his daughter, caught fire across the Internet and the then-emerging blogging world when I first posted the details on my own blog in late 2005.

Shortly after midnight on December 26, 2001, Maye, then 21, was drifting off to sleep in his Prentiss duplex as the television blared in the background. Hours earlier, he had put his 18-month-old-daughter to sleep. He was soon awoken by the sounds of armed men attempting to break into his home. In the confusion, he fired three bullets from the handgun he kept in his nightstand.

As he’d later testify in court, Maye realized within seconds that he’d just shot a cop. A team of police officers from the area had received a tip from an informant — later revealed to be a racist drug addict — that there was a drug dealer living in the small yellow duplex on Mary Street. It now seems clear that the police were after Jamie Smith, who lived on the other side of the duplex, not Maye or his live-in girlfriend Chenteal Longino. Neither Maye nor Longino had a criminal record. Their names weren’t on the search warrants.

Maye would later testify that as soon as he realized the armed men in his home were police, he surrendered and put up his hands. There were three bullets still left in his gun. But Maye had just shot a cop. And not just any cop. He shot Officer Ron Jones, Jr., the son of Prentiss Police Chief Ron Jones, Sr. Maye is black; Jones was white. And this was Jefferson Davis County, a part of Mississippi still divided by tense relations between races. Maye was arrested and charged with capital murder, the intentional killing of a police officer.

After a long series of delays, Maye was finally tried in 2004 in Marion County, Mississippi. Maye’s family shied away from retaining Bob Evans, the Prentiss public defender, a decision they’d later come to regret. Instead, they pooled their money and hired Ronda Cooper, an attorney in Jackson who made a number of critical mistakes during Maye’s trial. There were other problems with Maye’s trial as well, including testimony from Mississippi medical examiner Steven Hayne, who performed the autopsy on Jones. I’d later report on a number of questions about Hayne’s workload and credibility as an expert witness. He eventually resigned from the National Association of Medical Examiners and was barred from doing any more autopsies for Mississippi prosecutors.

In early 2006, after reading about Hayne’s case on a number of blogs, attorneys from the D.C. law firm Covington & Burling agreed to represent Maye pro bono. Maye’s family also went back to public defender and defense attorney Bob Evans. (Evans would later be fired as Prentiss public defender for his decision to represent Maye.) In the fall of 2006, at a hearing in Poplarville, Mississippi, Judge Michael Eubanks threw out Maye’s death sentence, finding that he had received inadequate defense counsel during the sentencing portion of his trial. Maye was to be taken off Parchman Penitentiary’s Death Row. Eubanks resentenced him to life in prison without the possibility of parole.

In November 2009, the Mississippi State Court of Appeals granted Maye a new trial, finding that he should have been permitted to move his trial back to Jefferson Davis County after his attorney mistakenly asked for a change of venue. In 2010, the Mississippi State Supreme Court upheld the order for the new trial, but on the grounds that Maye should have been permitted to offer the defense that he was defending his daughter on the night of the raid.