A man wrongly convicted of murder has lost his appeal against a Home Office bill for £37,000 for the cost of keeping him in jail for 11 years.
The convictions of Mr O'Brien and two other men were overturned in 1999
The money will come from £650,000 compensation Michael O'Brien won after being convicted of killing a newsagent.
Appeal judges upheld a Home Office claim for his "saved living expenses".
The Home Office later said people like Mr O'Brien should be left in the same financial position as if they had not been jailed, rather than better off.
A prisoners' lobby group called the decision "the sickest of all sick jokes".
Mr O'Brien said: "It just doesn't make sense.
He said: "I can understand if somebody has committed the crimes and were guilty and went into prison and they were taking money off them.
"But I can't understand why they are taking money off someone like myself who didn't choose to be in prison."
Mr O'Brien's solicitor, Nogah Ofer, said despite losing the case they had won the right to have a breakdown of how the compensation has been awarded, and to challenge how a final settlement is reached.
She said a compensation assessor could literally "pluck a figure out of thin air".
Philip Saunders' body was found in his Cardiff newsagents
Mark Leech, editor of The Prisons Handbook, an annual guide to the penal system of England and Wales, said: "Can you imagine Terry Waite getting a bill for the living expenses he saved during his five years wrongly held?
"What was provided to Mr O'Brien while in prison was required to be provided by law - seriously, who would have chosen to eat porridge every day and sleep on a prison mattress for a decade unless they had to?
"If the home secretary wants to claw back these expenses then he should look to South Wales Police who wrongly arrested and charged Mr O'Brien with murder, the south Wales CPS who put him on trial and the courts service who wrongly convicted him.
"What he cannot do is look to Mr O'Brien himself - for that is to rub salt into what is an already grievous wound."
Mr O'Brien - along with Darren Hall and Ellis Sherwood - was sentenced to life imprisonment for the murder of Mr Saunders.
Mr Saunders, who ran a kiosk at Cardiff bus station, was killed in 1987.
All three men's convictions were overturned in 1999.
Three years later, in May 2002, Mr O'Brien, 37, was awarded a payout of almost £650,000, but the £37,000 was taken out to cover his accommodation.
Mr O'Brien initially won a challenge to the decision in the High Court in April 2003, but the Home Office launched an appeal in March this year.
The Home Office had argued that not to make any deduction for his saved living expenses would leave him in "a better position" financially than he would have been in had he never been jailed.
In a statement after the Court of Appeal ruling, it said: "The purpose of compensation is to place the person in the position they would have been had they not been wrongly convicted.
"In doing so they will take into account a range of factors, including the person's salary and their living costs over the period during which they would have been in prison."