A county prosecutor in California who falsified a defendant’s confession and then said it was just a “joke” he was playing on a public defender now faces a year’s suspension of his law license.

The California State Bar announced the action Thursday against Kern County Deputy District Attorney Robert Alan Murray.

“Murray’s behavior is wholly inappropriate and unbecoming of an experienced prosecutor, who is expected to adhere to the highest standards of ethical conduct and to act as a gatekeeper to the fair administration of justice,” State Bar Court Judge Richard A. Honn wrote.

During a 2013 child molestation case against Efrain Velasco-Palacios, Murray added the following two lines to a transcript of Velasco-Palacios’ statement to law enforcement to make it sound like he confessed, according to court records:

[Officer Martinez]: You’re so guilty you child molester. [Palacios]: I know. I’m just glad she’s not pregnant like her mother.

Murray then gave the transcript, with his additions, to Velasco-Palacios’ attorney, Ernest Hinman, a public defender. Hinman then questioned his client about the confession, but Velasco-Palacios denied making it. Nine days later, Hinman asked Murray about the statement, and, according to court records, Murray admitted that he had falsified the confession but claimed that it was all a “joke” on the public defender.

Kern County Superior Court did not see the misconduct as humorous. Instead the court found it to be “outrageous” and “conscience-shocking” and that it violated Velasco-Palacios’ constitutional rights. All charges were dropped against Velasco-Palacios.

The Superior Court and the state Court of Appeal found that Murray intentionally altered the statement to influence plea negotiations. The State Bar Review Department agreed and rejected Murray’s explanation.

In a Nov. 10 opinion, the State Bar Court Review Department recommended that Murray’s discipline be increased to one year, up from a judge’s earlier recommendation of 30 days. The suspension will go into effect once approved by the California Supreme Court. Murray remains employed as deputy district attorney in Kern County.

The Kern County district attorney’s office did not immediately respond to a request for comment.

It’s hard to explain to clients why the very prosecutors' offices so eager to put them in jail for breaking the law can do so with impunity themselves. Ken White, criminal defense attorney

Ken White, a criminal defense attorney in Los Angeles and a leading voice on legal issues on the law-oriented blog Popehat, told The Huffington Post he was "happy to see the State Bar imposing consequences for prosecutorial misconduct at all. It’s far too uncommon. It’s rare for courts to call it out and rarer for the State Bar to take action even when courts do. That contributes to the criminal justice system’s serious cultural problem with prosecutorial misconduct. Treating it as no big deal encourages it. It’s hard to explain to clients why the very prosecutors' offices so eager to put them in jail for breaking the law can do so with impunity themselves."

Prosecutors are the most powerful government agents in the U.S. criminal justice system. They have complete and unrivaled access to evidence that can determine a person’s guilt or innocence. But when they are caught breaking the rules, they rarely face discipline.

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 ― which doesn’t always happen.

Prosecutors are also largely shielded from any liability that might result from their actions thanks to a Supreme Court ruling granting them “absolute immunity.”

In California, there often have been no consequences for prosecutors who have been caught cheating the system. According to a 2010 study from criminal justice reform group the Northern California Innocence Project, there were more than 700 California cases of prosecutorial misconduct from 1997 to 2009 ― and only six prosecutors in those cases were ever disciplined.

Of course, most prosecutors behave ethically. But even one bad actor in a prosecutor’s office can have a significant effect on countless defendants and cases. And based on the data that are available, it’s clear that there are more than 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,” Alex Kozinski, a judge on the U.S. 9th Circuit Court of Appeals, wrote last year in a landmark paper critiquing the criminal justice system nationwide. “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.”

But identifying the misconduct is only part of the equation. Meaningful discipline must then follow as a deterrent, and California is working toward just that. Prosecutors who knowingly withhold or falsify evidence can now be charged with a felony and go to prison under a California law signed just last month.

And to further crack down on cheating prosecutors, in October, the California State Bar Board of Trustees approved new ethics rules regarding prosecutors’ duty to turn over evidence. The rules must still be approved by the state Supreme Court in order to take effect.