Editor's note: Jeffrey Toobin is a senior legal analyst for CNN and a staff writer at The New Yorker magazine, where he covers legal affairs.
(CNN) -- The most important part of criminal law doesn't appear in any statute book or textbook. It's not even a formal "law" at all. It's the concept of prosecutorial discretion, and it is at the heart of our justice system -- as the pursuers of Casey Anthony and Dominique Strauss-Kahn have discovered.
Criminal laws are written in ways that leave prosecutors a great deal of leeway. Do they bring a case at all? If so, when? And when that moment arrives, what charges do they put before a jury? In both of these high-profile cases, the prosecutors made decisions that raise important questions about their judgment.
The authorities in Florida were confronted with a tragedy, to be sure, but to this day, it is not clear it was a crime. Anthony's failure to call the police and report her daughter, Caylee, missing for an entire month remains a chilling and appalling fact. It also seems clear today that Anthony had something to do with the little girl's death.
But prosecutors charged Anthony with capital murder and sought the death penalty. The trial made clear that this case had virtually none of the features that we associate with cases that merit the death penalty. There were no eyewitnesses. There was no clear cause of death, no clear time of death, and an absence of motive evidence as well.
The prosecutors committed a cardinal sin: They overcharged and they paid the price. The defense went to the jury with a much more plausible story -- that Caylee died accidentally and Anthony's cover-up spun out of control. It's not a story that reflects well at all on Anthony as a human being or a mother -- but not one that calls out for execution either.
The Strauss-Kahn prosecutors faced a different problem. On May 14, New York police received a credible report that Strauss-Kahn had assaulted a maid at the Sofitel hotel in Midtown Manhattan. Officers tracked down Strauss-Kahn, who was on a plane at John F. Kennedy International Airport about to leave for Paris. Their decision to arrest him was clearly correct. Had he left the country on that flight, it would have been difficult, if not impossible, to bring him back to the United States.
But only five days later, on May 19, the New York district attorney sought and obtained an indictment of Strauss-Kahn in the case. By doing so, the prosecutor locked himself into bringing the case to trial -- before there was time to do any serious investigation of the facts.
In the following month, as the district attorney was compelled to acknowledge, parts of the accuser's story and her account of her background fell apart. Her credibility is in tatters. It's not clear that Strauss-Kahn is innocent of the attack, but it is clear that, given the accuser's problems, a jury may never convict him.
What was the rush to indict? The district attorney had the legal tools to make sure Strauss-Kahn stayed in the United States while the investigation ran its course. Indeed, Strauss-Kahn's attorneys would have welcomed the delay; the defense always welcomes a chance to put off an indictment. But the prosecutor, clearly overconfident, pushed the grand jury to act prematurely. Now he is paying the price.
Hindsight is perfect. Second-guessers are as irritating as they are always right. But these mistakes by prosecutors -- overcharging in the Anthony case, rushing to judgment in Strauss-Kahn -- were apparent even at the time. Prosecutorial misjudgments can deprive the victims of crime, and society at large, of the punishment and incarceration of those who broke the law.
The opinions expressed in this commentary are solely those of Jeffrey Toobin.