St. Louis County authorities finally agreed on Thursday to drop charges they filed against Washington Post reporter Wesley Lowery and me in connection with our unlawful arrests in Ferguson on Aug. 13, 2014. In exchange, we've agreed not to sue the Missouri county for the illegal conduct of its police officers.

The deal is a win for me and Wes, as well as our employers. But it doesn’t quite feel like one.

The ordinance violation charges that had been pending against us in St. Louis County Municipal Court since August 2015 -- one for “trespassing” in a McDonald’s where we were customers and the other for “interference” with the duties of the police officers who forcefully took us into custody -- should never have been brought.

Yet had I been the one paying the legal bills instead of The Huffington Post’s parent company (thanks, AOL!), I may have been forced to give up and cop a plea a long time ago. We had enormous advantages in this case. Not everyone arrested on a municipal ordinance violation has the U.S. president and attorney general speak out on their behalf. Still, dealing with this bogus case has been frustrating, infuriating and time-consuming.

It’s only because Wesley and I have the resources of large companies at our disposal that it hasn’t come with a huge personal monetary cost.

The facts were on our side. The manager of the McDonald’s never asked us to leave (let alone be arrested) and welcomed us back to the restaurant on many occasions. The evidence made clear what had happened: Stressed-out officers who didn't want their actions recorded had decided to lash out at a couple of reporters. No charges were warranted. But prosecutors endorsed the ridiculous theory -- which the police pushed -- that two journalists recording the actions of police officers in a fast food restaurant “directly contributed” to the civil unrest in Ferguson in August 2014.

The law was on our side. Attorneys in the St. Louis County Counselor’s Office (which mostly focuses on protecting officials from lawsuits but also prosecutes minor violations in unincorporated parts of the county) lacked jurisdiction to bring municipal ordinance violations in St. Louis County Municipal Court. One of the municipal codes we were charged with violating, which makes it unlawful for a person to “interfere in any manner with a police officer or other employee of the County in the performance of his official duties,” is a “contempt of cop” statute that is unconstitutionally overbroad. It should not have even been on the books. A Supreme Court decision struck down a similar ordinance when I was in diapers and before Wesley was born.

Sgt. McCann slammed my head on the door while I was in handcuffs and then lied about doing so

The two cops involved in my arrest, former Ferguson officer Justin Cosma and St. Louis County Sgt. Michael McCann, had plenty of time to get their stories straight. They weren't even interviewed for the investigative report until eight months after the incident. Yet in depositions, they couldn't even agree on who arrested me: Each claimed he was only assisting the other. Sgt. McCann slammed my head on the door while I was in handcuffs and then lied about doing so in the internal investigation of his conduct, which could have resulted in a federal civil rights charge.

In the nearly full year between our arrest and the time St. Louis County brought charges, I went through the official process, filing a complaint about McCann’s conduct with the St. Louis County Police Department and making public records requests in an effort to obtain McCann’s name, which he had repeatedly refused to provide. During that time, I decided not to get involved in a lawsuit that four other journalists ultimately filed against St. Louis County. We had been released relatively quickly, our case had received so much attention already and I felt that I’d ultimately have to donate any monetary settlement I received to charities in the St. Louis region, so it simply didn’t seem worth my time. As Wes and I had never even been officially booked, we thought the incident was over and had no idea that St. Louis County was considering charges.

By the time county officials decided to charge us, the journalists' lawsuit and several others had already been filed. The charges, it seemed, gave the county an opportunity to head off additional litigation. The county had used municipal court charges as leverage in settling a lawsuit filed by journalist Trey Yingst, even though those charges were based on a police report that was demonstrably false based on video from the scene.

St. Louis County Counselor’s Office played a problematic dual role of protecting County officials from lawsuits while simultaneously prosecuting minor ordinance violations. The lawyer who ultimately prosecuted me is the same one who had previously responded to my public records requests and been involved in clearing the language of the letter the police chief sent me about my internal affairs complaint. Even the City of Ferguson recently recognized that having the same person act in both roles can be a conflict of interest.

The deal we reached with St. Louis County -- often referred to as a release-dismissal agreement -- illustrates why this sort of arrangement can be a problem. Those deals have been the subject of much legal and ethical debate. These agreements “suppress complaints against police misconduct which should be thoroughly aired in a free society” and “tempt the prosecutor to trump up charges for use in bargaining for suppression of the complaint,” a federal appeals court ruled in 1984. But the Supreme Court ultimately decided in a 5-4 decision in 1987 that while release-dismissal agreements could tempt prosecutors to bring frivolous charges, it couldn’t be assumed that prosecutorial misconduct took place. Each agreement had to be evaluated on a case-by-case basis.

The longer St. Louis County could drag this out, the higher our costs would get, and the more likely we’d be to take a settlement.

I never had any doubt we’d ultimately win. But financially, fighting these charges made little sense. A deal probably would have resulted in few if any actual consequences for us, but it also would have legitimized bogus arrests and provided cover for officers who violated our rights and engaged in misconduct. So the process really served as the punishment. The longer St. Louis County could drag this out, the higher our costs would get, and the more likely we’d be to take a settlement.

And drag it they did. In the nine months since it brought the charges, St. Louis County has fought us at every turn, even successfully fighting our motion for a joint trial. Officials in St. Louis County Municipal Court even accidentally issued warrants for our arrest. Municipal Court Judge Craig Concannon -- appointed after donating more than $20,000 to the reelection campaign of St. Louis County Executive Steve Stenger -- consistently sided with County Counselor Peter Krane, another Stenger appointee.

I’m glad it’s finally over. But I’m still angry. I’m a new dad, and having a theoretical jail sentence hanging over my head -- no matter how unlikely it was -- during most of my wife’s pregnancy and in the first three months of my daughter’s life wasn’t fun.

It was, arguably, a valuable experience: If every journalist covering criminal justice in this country was forced to go through the process we did, our coverage would be much more critical.

I’ve thought a lot about the conversations I had with citizens and demonstrators in Ferguson back in August 2014. It seemed like everyone I spoke with had a horror story about the police and municipal courts. But even after my arrest and witnessing the way police treated protesters even during peaceful demonstrations in broad daylight, I was still skeptical that the entire system in the region, including the courts, could be as broken as they described. It couldn’t possibly be that bad, I thought.

So now I’m willing to do something the St. Louis County Police Department seems incapable of: admit I was wrong.