Three years ago, one of the strangest criminal cases in recent memory began in Charlottesville, Virginia, where I live, when a young woman sent a series of text messages telling her boyfriend that a man had abducted her, followed by a series of texts, allegedly from her captor, taunting her boyfriend with threats of sexual violence. Her story was strange, and the case was fraught with complications from the get-go, but the accused ended up in prison long after the doubts outweighed the evidence.

This story is bizarre, but it’s not all that unusual: Prosecutors can prosecute even the weakest, most clearly flawed cases relentlessly, and innocent people can end up in jail.

This week, after two and a half years in prison, Mark Weiner saw his conviction vacated. It finally ended a saga in which Weiner was arrested, convicted, and sentenced to eight years in jail on charges of abducting a woman with the intent to sexually harm her.

(Disclosure: Weiner’s son and mine attended the same preschool. I have had no contact with him or his family in several years.)

The story began on a December night in 2012. Weiner, then a 52-year-old man who managed a local Food Lion and attended night classes at a local community college, stopped and picked up 20-year-old Chelsea Steiniger, who was walking from a convenience store to her mother’s house. Steiniger’s boyfriend, Michael Mills, had just informed her that she could not sleep at his apartment, which did not permit guests after a certain hour, so she was angrily headed to stay with her mother. It was cold, it was dark, it was late. Weiner saw her and offered to drive her to her mother’s house, picking her up directly across from the local police station.

Mark Weiner’s version of events: He drove Steiniger to her mom’s house and went home.

Most of the rest of the trial narrative unfolds through the sequence of texts Steiniger sent her boyfriend as they drove to her mom’s place.

At 12:10 a.m., Steiniger texted her boyfriend that “some dud[e]” was giving her a ride. At 12:18 a.m., she texted, “he tried to get in my pants.” At 12:21 a.m., she texted, “just pulled up he wont let me out of the car.”

At 12:23 a.m., the texts allegedly start coming from Weiner instead of Steiniger, the first one reading: “[S]he doesn’t have her phone.” And at 12:27: “Shes so sexy when shes passed out.” At 12:28: “She was a fighter ill give her that much.” At 12:36: “Ill let her wake before i let you talk to her.”

When a panicking Mills texted back at 12:38 a.m., “w[h]ere are you taking her,” Weiner allegedly responded: “[S]hes in my house she said she was cold so IMMa warm her up.”

Steiniger testified that Weiner, while driving past the mother’s house, managed to knock her out at about 12:22 a.m. with a chemical-soaked cloth that worked in 15 seconds, at which point he began sending the taunting texts to Mills. Including a text using the word IMMa—not the most common expression for white, 52-year-old Food Lion managers.

That’s right: Over the course of four minutes, Weiner allegedly incapacitated Steiniger, took control of her phone, and texted her boyfriend, all while driving to a rural property late at night.

Steiniger claimed she awoke on the floor of an abandoned building she had never seen before, and when Weiner left her unattended, she grabbed her phone and jumped off a second-floor balcony, hid in the woods, then made her way on foot to her mother’s house two miles away. She never called 911.

But her boyfriend, Mills, had already called 911 to report the abduction. When the Emergency Communications Center called Steiniger at 1:07 a.m. and left a message, then called again at 1:08, she checked her voicemail and quickly shut off the phone. She would later testify that her battery was dead at this time, but records would show she retrieved the voicemail and then switched the phone off.

When the police were unable to reach Steiniger by phone, they went to her mother’s home. Steiniger answered the door, clothes intact and unsoiled after she supposedly jumped from a second-floor balcony and walked two miles in the cold.

On Dec. 14, 2012, Mark Weiner was arrested. He had been incarcerated in the Albemarle-Charlottesville Regional Jail ever since.

Records later showed that Steiniger’s phone accessed two cellphone towers near her mother’s house dozens of times that night, but never once pinged a tower near the abandoned house.

This was the basis of a massive trial in the spring of 2013. The most vigilant reporting on the entire Mark Weiner prosecution has been done by Lisa Provence, who has covered the case for more than two years, showing growing doubts about the strength of the case against Weiner and deepening concern about the state’s persistence in going after him, even in the face of a growing mountain of exculpatory evidence. Her accounts of Weiner’s trial and subsequent hearings are worth reading in full. The fact that there was a trial at all is remarkable.

The Albemarle County prosecutor, who is elected to the post, is currently Commonwealth’s Attorney Denise Lunsford. As part of her prosecution strategy, Weiner’s trial lawyer later said, Lunsford “sought the advice of two respected detectives in the city and the county” to pinpoint where the alleged victim’s text messages had originated. Each cop concluded independently that the texts had been sent from near where Steiniger’s mother lived. Lunsford interviewed the first officer for the first time at the courthouse, just before he was scheduled to testify. He told the prosecutor he’d guess the calls came from Steiniger’s mother’s house, not the abandoned property.

Some prosecutors would call that sort of thing exculpatory information that must legally be turned over to the defense. Lunsford thanked the officer for stopping by and said she would no longer be needing his testimony after all. (This officer would later call the defense attorney and tell him what had transpired.) The second law enforcement officer offered up the same conclusion. He didn’t get to testify, either.

When defense counsel learned of the cellphone evidence and attempted to use one of the detectives as a defense witness, Lunsford had him disqualified as an expert, objecting to the fact that the defense attorney hadn’t subpoenaed the right witnesses to get the phone record evidence in. When the defense lawyer asked in chambers for a continuance so that he could call the correct witnesses, the motion was denied by trial court Judge Cheryl Higgins. Jurors would never hear what the phone tower records showed. Local lawyers and trial observers were shocked.

Deirdre Enright, director of investigation for the University of Virginia School of Law’s Innocence Project Clinic (disclosure: and a friend of mine), notes that this is where the idea of justice got confused with the promise of winning. As she says, “Lunsford appears to have learned in the middle of her case against Mark that the ‘victim’s’ cell phone tower records contradicted the victim’s version of events, and corroborated the defendant’s. Leaving aside the fact that a competent prosecutor is not learning the underlying facts of her case mid-trial, this was the kind of exculpatory evidence that would cause a fair prosecutor, honoring her obligation to seek and serve justice, to dismiss the charge. Instead, she successfully argued against their admissibility in court. In the wrongful conviction world, the nicest description we have for this phenomenon is ‘tunnel vision.’ ”

At the trial, no physical evidence was presented that in any way connected Weiner to the abandoned house or to Steiniger’s cellphone. No rag was found soaked with a chemical that could knock you out in 15 seconds.

Weiner was convicted by the jury on Steiniger’s testimony. He was immediately sent to jail.

In the spring of 2014, Weiner’s new lawyers filed a motion to set aside the jury verdict. They alleged ineffective assistance by his original trial counsel. (Among other errors, the first lawyer had found a matchbook in which Steiniger had written her phone number in case a job opened up at Food Lion, but didn’t put it into evidence.) They also noted that Steiniger’s then-husband, Howard Steiniger, who was incarcerated at the time of the alleged attack, had signed an affidavit saying that she had admitted to making this story up in an attempt to get back at a guy named Mike. Her admission, he said, was made while they talked on the phone, on a recorded prison call. Records of the call were destroyed when lawyers attempted to obtain them. The new defense team also informed the court that even Mills, the boyfriend, suspected Steiniger was lying when he texted her: “why did u lie to me.”

Weiner’s lawyers also presented an affidavit from anesthesiologist John Janes, testifying that there is no chemical that can be put on a rag and placed on someone’s face that would cause that person to pass out within 15 seconds.

At a sentencing hearing, however, prosecutors introduced evidence that there were three police reports involving Weiner approaching women at night.

The defense team’s motion to reverse the verdict was denied.

In another motion, filed in April of 2015, Weiner’s attorneys told the court that they now had testimony from three former friends of Steiniger who said she drank and smoked pot several times at the abandoned house in 2012, despite her claim at trial that she had never been to the home before the alleged abduction. Again Commonwealth’s Attorney Lunsford took the position that this changed nothing.

At a June 3 hearing, Judge Cheryl Higgins did not dispute most of the new allegations. But she claimed she didn’t have the authority to throw out the verdict and said the new claims could be raised on appeal. On June 9 she sentenced Weiner to 20 years in prison, with 12 years suspended.

After that final hearing, at which Mark Weiner was sentenced to eight years in prison for giving a young woman a ride home, Lunsford explained why none of the new evidence mattered: “I interviewed the victim twice, and I believed her.”

And perhaps that’s the problem right there: Facing a mountain of evidence that showed there was no way the alleged victim could be telling the truth, the prosecutor believed her, then believed her, and then believed her some more.

Finally, this week, Judge Higgins did vacate Weiner’s conviction. This time, prosecutor Lunsford joined with Weiner’s defense attorneys in a motion to call for his conviction to be vacated, only a month after fighting the earlier motion. New evidence had surfaced: Steiniger, the alleged victim of Weiner’s attempted abduction, had been caught this past February selling cocaine to two undercover officers. According to a motion filed by the defense, joined by the prosecutor, this new evidence might impeach the credibility of the complaining witness.

The motion to vacate and the statements made by the prosecutor are not an admission of error, it seems, so much as an admission that public confidence has been eroded in so many tiny increments in this case that Weiner should walk free. Lunsford referred to the drug sale as “the straw that broke the camel’s back,” suggesting that she knew this camel had been overloaded for a long, long time.

Mark Weiner has lost more than two years with his young son and with his wife, he’s lost his job, he’s lost his family home, and he’s lost every penny he ever had in savings or retirement accounts.

This has been a horrific year in Charlottesville, between the loss of Hannah Graham and the Rolling Stone article about an alleged gang rape at the University of Virginia. There are indeed predators everywhere. But not every man is a predator just because the police catch him or prosecutors try him. And we have a system that doesn’t allow for the admission of error when we make errors in our zeal to feel safer.

If anyone suggests that the fact that Mark Weiner was released this week means “the system works,” I fear that I will have to punch him in the neck. Because at every single turn, the system that should have worked to consider proof of Weiner’s innocence failed him.

Lunsford claimed this week in a radio interview that the commonwealth needed to vacate the conviction based on preserving the “integrity of the system” and the “perception of the system as being fair.” But none of this explains why the prosecutor’s office deemed a subsequent drug charge to be more disqualifying than contemporaneous phone records, impeachment testimony, expert testimony, and other exculpatory evidence that had not only been dismissed, but in some cases excluded, by the prosecutor’s office for more than two years. The criminal justice system allows multiple opportunities to stand down from a bad prosecutorial call—opportunities ranging from dropping a bad case, to turning over exculpatory material, to recommending that convictions be vacated. But there is no incentive to stand down.

Because we elect our prosecutors, there is no chance of apology, and no admission of error. Justice by popularity contest will ensure that. But Mark Weiner’s journey into legal purgatory is more than just a quirky local tale; it shows why innocent people get trapped in a system in which it is costless for prosecutors to make errors, while mistakes made by defense counsel at trial are virtually impossible to correct.

Mark Weiner’s freedom did not come about this week because the system worked. It came about because the system protected the system from abject embarrassment. That isn’t justice. That’s just sad.