Years in jail for murder he didn't commit: 18. Compensation: $0.00

He spent 18 years in a Louisiana prison for a murder he did not commit, coming within weeks of being executed. Yet the US Supreme Court has thrown out a jury verdict awarding John Thompson $14m (£8.75m) in compensation.

The court ruled by five to four that Mr Thompson had not demonstrated a pattern of misconduct in the New Orleans district's attorney office, which at the time of his conviction was headed by Harry Connick, the father of the famous singer of the same name, and therefore was not entitled to compensation.

Mr Thompson, who has written a memoir about his lost years that may soon be a Hollywood film, was first convicted in 1985 of a car-jacking, a guilty verdict that was then used by the DA's office to secure a conviction for the killing the year before of Raymond Liuzza, the son of a well-known hotel owner in New Orleans.

The case against him began to unravel in 1999 when private detectives discovered a blood test carried out during in the car-jacking case which showed Mr Thompson could not have committed the crime. That test, however, had not been submitted as evidence at the trial. That discovery led to a new trial for Mr Thompson, during which other new evidence was offered that led to his being cleared in both cases. A local jury later ordered the DA's office to pay him the $14m.

But the conservative majority in the Supreme Court found nothing in the case persuaded them to reverse legal precedent protecting prosecutors from being sued for anything they do in the course of their work. The argument that Mr Connick, who resigned as New Orleans DA in 2003, presided over an office that repeatedly hid exculpatory evidence did not impress the justices. Nor apparently did Mr Thompson's tale of extraordinary woe.

Reacting to the decision, lawyers for Mr Thompson, who spent 14 of his 18 years behind bars in virtual isolation on death row, insisted they had demonstrated "multiple constitutional violations by multiple prosecutors", in Mr Connick's office. In a statement, they said: "If prosecutors' offices cannot be held accountable under the facts of this case it is difficult to imagine when they would be accountable."

Leading the liberal minority in the court, Ruth Bader Ginsberg, in a rare spoken dissent, accused the majority, led by Justice Clarence Thomas, of seeking to protect a DA's office from the consequences of "flagrant" misconduct. But in the majority opinion Justice Thomas wrote that the Thompson case amounted to a "single incident" where mistakes were made in New Orleans and the case did not prove "deliberate indifference" on the part of Mr Connick.

The Supreme Court decision will be welcomed by DA offices across the country which will now remain fully protected against lawsuits from those they prosecute, however badly awry individual cases may go.