In 1994, Anthony Graves was convicted on charges of setting a fire that killed six people in south Texas. He spent the next 18 years in prison -- 12 of them on death row. On two separate occasions, he came close to execution -- all for a crime he didn't commit.

But Graves was spared the death penalty long enough to get an appeal. A closer look at his case eventually revealed that Graves was an innocent man who was railroaded by Charles Sebesta, a Texas prosecutor who withheld evidence and presented false testimony to secure a conviction against Graves. More than a decade later, a federal appeals court would overturn the conviction. Graves was freed, and later filed a complaint against Sebesta, seeking his disbarment. The Texas bar’s Board of Disciplinary Appeals sided with Graves, calling Sebesta’s conduct “egregious” and revoked his right to practice law.

As of this week, Sebesta is now officially, and finally, disbarred.

While Sebesta's actions may appear obviously condemnable to the casual observer, experts say it's actually surprising that he was punished for them.

“It’s almost unheard of,” U.S. Circuit Judge Alex Kozinski told The Huffington Post. Kozinski is a leading voice on prosecutorial misconduct, who famously wrote in a 2013 opinion that the problem had “epidemic” levels in the U.S.

Prosecutors are rarely punished for misconduct, and the cases that have led to disbarment or even criminal charges are few and far between. When prosecutors do face severe consequences for breaking the law, it's when their behavior is deemed to be deliberate and seemingly indefensible. At the same time, their punishment may not be proportional to the damage they have inflicted upon innocent people, which illustrates the considerable latitude the legal process affords to prosecutors.

For example, take disgraced former prosecutor Mike Nifong, who was involved in the 2006 Duke lacrosse case, in which three members of the team were falsely accused of rape. Nifong, among numerous serious legal misdeeds, was accused of misleading presentations of evidence including withholding DNA evidence, yet spent a grand total of 24 hours in jail following his disbarment.

In the 2013 case of Ken Anderson, the former Texas prosecutor and judge ultimately pled no contest to felony charges of criminal contempt of court for intentionally withholding evidence in a case against Michael Morton, an innocent man, who wrongfully spent 25 years in prison for the murder of his wife. For his violations of the Constitution, Anderson was forced to give up his license to practice law, was ordered to perform 500 hours of community service and to spend 10 days in jail -- the first prosecutor ever to go to jail for wrongfully convicting an innocent man.

These three cases, by far, represent some of the most severe sanctions ever lobbed against criminal prosecutors accused of serious misconduct.

Prosecutors are the most powerful government agents in the American criminal justice system. With more than 2,300 offices across the nation, they have complete and unrivaled access to evidence that can determine a person’s guilt or innocence.

Multiple Supreme Court rulings over the years have sought to chip away at the unilateral power of prosecutors, requiring them to provide any and all evidence to the defense that might be favorable to the defendant. But this puts defense attorneys on the back foot as they're forced to blindly trust that prosecutors will turn over all their evidence.

Prosecutors can also cut deals with witnesses, co-conspirators and defendants to compel someone to testify. They can pile on charges to produce sentences “so excessively severe they take your breath away” to strong-arm someone into taking a plea deal to reduce that sentence.

If prosecutors can't find someone to talk, they can always turn to a jailhouse snitch who may be able to coax out a damning bit of evidence from a jailed defendant. That testimony, obtained legally or otherwise, can often be used to lock down a conviction.

And in the end, prosecutors are largely shielded from any liability that might result from their actions thanks to a Supreme Court ruling granting them “absolute immunity.”

Of course, the vast majority of prosecutors behave ethically. But even one bad actor in a prosecutor’s office can have a significant impact on countless defendants and cases. And based on the data that is available, it’s clear that there are more than just a few bad apples.

“There are disturbing indications that a non-trivial number of prosecutors -- and sometimes entire prosecutorial offices -- engage in misconduct that seriously undermines the fairness of criminal trials,” Kozinski wrote last year in a landmark paper critiquing the criminal justice system. “The misconduct ranges from misleading the jury, to outright lying in court and tacitly acquiescing or actively participating in the presentation of false evidence by police.”

The trouble is identifying the misconduct. Because so much of what prosecutors do is behind the scenes -- gathering evidence and working with police and investigators as they build their case -- malfeasance is often not discovered until years, sometimes decades, after a person has been convicted. In many cases, it’s never discovered at all.

But the data that is available on prosecutorial misconduct clearly points to a problem that is steady and widespread. Misconduct by police and prosecutors occurs with such frequency that it has become one of the primary causes of wrongful convictions, according to the Innocence Project.

A 2013 report from the Center for Prosecutor Integrity, illustrated just how rare it is for prosecutors to face punishment of any kind. Using data from nine major studies that analyzed the prosecutorial misconduct at both state and national levels, CPI identified 3,625 cases between 1963 and 2013. Of those, only 63 prosecutors -- less than 2 percent -- were ever officially sanctioned for their wrongdoing. And in those rare instances when prosecutors were disciplined, they frequently received a “slap-of-the-wrist,” the CPI report reads.

There has also been a significant spike in exonerations in recent years. While this phenomenon used to be rare, wrongful convictions have soared, with more overturned in 2015 than any year in history. And while not every wrongful conviction involves a misbehaving prosecutor, a significant portion do.

But identifying the misconduct is only part of the equation. Meaningful discipline must then follow as a further deterrent. That can’t -- and doesn’t -- happen when there’s no one willing to prosecute the prosecutors.

State authorities are ill-equipped to tackle prosecutorial impropriety for a variety of reasons, says Daniel Medwed, a law professor at Northeastern University who has written about this phenomenon in depth.

Those reasons can range from the general style of case to that of skepticism over complaints filed by criminal defendants who may simply be seen as “disgruntled” by authorities and not be taken as seriously as they perhaps should be.

But there may be something more intangible and pervasive at play. Medwed told HuffPost he believes there's an engrained culture across criminal justice offices that has created a system in which lawyers are reluctant to take on prosecutors, even when they are behaving badly.

“[Prosecutors] are politically powerful people who do a tough job under arduous circumstances,” he said. “I think lawyers often give them the benefit of the doubt. This is a huge problem. We must hold them accountable.”

To that end, Sebesta's disbarment is at least a step in the right direction. But it remains an outlier to the broader trend. To further curb bad behavior, stricter rules must be implemented to crack down on the prosecutors who engage in misconduct. And those rules must be fortified with the promise of stiff and certain punishment for anyone who would undermine the principle of justice in pursuit of an unjust conviction.

Also on HuffPost:

PHOTO GALLERY No Seconds: The Last Meals Of Death Row Prisoners