Updated

The city agreed to pay $2 million to settle a lawsuit over the death of a 67-year-old man in a police lockup after a judge delivered an extraordinary rebuke about the performance of the city's lawyer.

James Stone, arrested for a parole violation, had a heart attack and died at a police station in 2005. Lawyers for his estate said he complained for hours about chest pain but no one took him to a hospital.

The case was settled Monday for $2 million before a jury was picked in federal court, said Towana Tate, a lawyer for Stone's estate. City lawyers declined to comment on the financial terms.

Stone's family is happy the litigation is over "but they're still grieving and upset over their dad's death," Tate said Tuesday.

U.S. Magistrate Judge Steven Pepe accused the city Feb. 6 of "egregious misconduct" during the discovery phase of the case.

Stone's estate had complained that city lawyer Jacob Schwarzberg repeatedly failed to follow orders and turn over documents, a routine procedure in civil lawsuits.

"I'm frank to say in 25 years I can't remember a case in which discovery has been so halting, so much delayed, so piecemeal and so poorly performed," Pepe said in court in early January.

Schwarzberg said he was "very embarrassed."

"This case is the case from hell for me," he told Pepe, according to a transcript.