CHICAGO (STMW) — Testimony by a former Chicago police detective that triggered a mistrial in the ongoing saga of a wrongfully convicted former death row inmate has turned out to be a $68,000 mistake.

U.S. District Judge Matthew Kennelly ordered David O’Callaghan’s lawyer to pay $63,000 in attorney’s fees and $5,618 in expenses to counsel for former El Rukn gang member Nathson Fields. He did so because O’Callaghan’s testimony last year ran afoul of a court order and short-circuited a trial over Fields’ federal lawsuit against the city.

READ MORE: Pair Charged In Murder Of 8-Year-Old Melissa Ortega Denied Bail; Accused Teen Gunman Committed Three Previous Carjackings, Prosecutors Say

Convicted in 1986 of a double murder, Fields spent 18 years behind bars — 12 on death row — before he was cleared after a retrial in 2009.

After he was cleared, a long-missing police file connected to his case was “discovered” buried in an old filing cabinet in the basement of a South Side police station. Police and prosecutors for years denied the file existed; Fields’ lawyers claimed it was hidden on purpose because it held evidence that might have cleared Fields far sooner.

Fields sued the city and the cops he said had framed him. The first attempt to take the lawsuit to trial ended in a mistrial when O’Callaghan violated a court order by referring to “terrorism cases” during his testimony. Records show he made the comment in response to questions from city lawyer Terrence Burns.

Kennelly found the reference to El Rukn gang leader Jeff Fort’s 1987 conviction for domestic terrorism could have unfairly prejudiced the jury against Fields.

The judge wrote in his ruling Friday that he doesn’t believe Burns meant for O’Callaghan to violate the court order.

READ MORE: Chicago First Alert Weather: Lake Effect Snow To Impact Your Commute

Fields lost on nearly all of his claims when he took the lawsuit to trial again, prevailing only on a single claim against O’Callaghan; jurors found O’Callaghan had either fabricated or withheld evidence to help convict Fields. But Kennelly also found earlier this year that the second trial was unfair.

Authorities hid a “bonanza” deal that allowed a key witness for the city to get out of prison early after he testified against Fields last year.

Fields’ alleged accomplice and fellow high-ranking El Rukn, Earl Hawkins, testified for the city that Fields was in fact guilty. He told jurors he had no deal with authorities for a significant reduction in his sentence in return for his testimony and that he did not expect to get out of prison until 2026.

But just months after his testimony helped the city, Hawkins was a free man. Among those who had urged the parole board to release him were O’Callaghan, several other cops, Assistant Cook County State’s Attorney Brian Sexton and Assistant U.S. Attorney William Hogan.

The decades-long legal saga began with Hawkins bribing a Cook County judge when he stood trial alongside Fields in 1986 for the murders of two men.

MORE NEWS: Bears Reportedly Hiring Colts Defensive Coordinator Matt Eberflus As New Head Coach

(Source: Sun-Times Media Wire © Chicago Sun-Times 2015. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)