THERE WAS an air of celebration at D.C. Superior Court this week when a judge exonerated Kevin Martin of the 1982 killing of a D.C. woman — but the joy could not mask the injustice done to Mr. Martin. While federal prosecutors deserve credit for helping to clear Mr. Martin of a crime he didn’t commit, they also should be asking whether the mistakes of the case should have been detected earlier.

“Take care, Mr. Martin. You look like a happy man,” Superior Court Judge Robert I. Richter said Monday after ruling that new DNA evidence was conclusive proof of Mr. Martin’s innocence in the sexual assault and murder of Ursula C. Brown on Nov. 1, 1982. Mr. Martin, then 19, had admitted his guilt in a series of armed robberies similar to the events in Ms. Brown’s case but said he knew nothing about her death and was not involved. Only when presented with forensic evidence purportedly linking his hair to the crime scene did he agree to the plea that saw him imprisoned for 26 years. He was paroled in 2009; if not for the manslaughter conviction in Ms. Brown’s death, he would have been freed roughly 12 years earlier.

Mr. Martin, as The Post’s Spencer S. Hsu has catalogued in a series of articles, is the fifth man that federal prosecutors in the District acknowledged was wrongly convicted due to faulty FBI forensics that relied on the supposed legitimacy of hair-sample analysis. The four others — Kirk Odom, Donald Gates, Santae Tribble and Cleveland Wright — collectively spent more than 100 years in prison. They represent only the local cases; it’s estimated that thousands of cases involved flawed FBI forensics work, which was first detected in the early 1990s.

Just as troubling as the bad lab work has been the response by authorities. Days before Mr. Martin’s day in court, the Justice Department’s Office of Inspector General issued a report faulting the department and the FBI for delays in reviewing affected cases and notifying defendants or their attorneys. In some cases, the reviews came too late, with defendants put to death before their cases could be examined to determine whether their convictions should be overturned. Only now, decades after a whistleblower reported the forensic problems, are the names of defendants whose convictions involved FBI hair analysis being ­released.

Prosecutors in Mr. Martin’s case eventually did the right thing, and it’s to their credit that new evidence was developed that cleared him. But a system that essentially gives carte blanche to authorities to reexamine their own mistakes on their own timetable is fundamentally flawed. It’s yet another reason to reform the discovery process for evidence. Instead of prosecutors deciding what might be exculpatory, they should not be allowed — absent a compelling reason of witness safety or national security — to hold anything back from the defense. That could prevent shameful cases like that of Mr. Martin.

Comments our editors find particularly useful or relevant are displayed in Top Comments, as are comments by users with these badges: . Replies to those posts appear here, as well as posts by staff writers.

To pause and restart automatic updates, click "Live" or "Paused". If paused, you'll be notified of the number of additional comments that have come in.

Comments our editors find particularly useful or relevant are displayed in Top Comments, as are comments by users with these badges: . Replies to those posts appear here, as well as posts by staff writers.