A disabled alcoholic has been ordered to live in a "prison" of a care home to prevent him from drinking himself to death.
Earlier this week appeal court judges supported a decision by Brighton and Hove City Council to detain the 37-year-old man who can only be identified as RB.
RB's counsel, Richard Gordon QC, said it was a misuse of the law to incarcerate an alcoholic just to stop him drinking.
But Lord Justice Jackson ruled that “deprivation of liberty is necessary in order to protect RB from seriously injuring himself”.
Mr Gordon described his client as a "caged prisoner" and said it could not be in his best interests to be incarcerated for years.
RB was an alcoholic with an extensive criminal record and a past history of homelessness and sleeping rough before he was found collapsed in the street in June 2007 with a severe head injury which impaired his mental processes.
After eight months in hospital RB resumed his former lifestyle, leaving the unit to socialise with the homeless, obtain alcohol and cannabis, and returning drunk or presenting himself at the accident and emergency department at hospital.
He has been held in a care home since 2011 after being detained under the Mental Capacity Act, and was only allowed to leave under the care of an escort.
The court was told RB strongly resented the restrictions but the council was not prepared to release him to live in the community.
The Court of Appeal said RB lacked the mental capacity to decide where he should live and that detention was in his best interests.
Lord Justice Jackson said: "RB was able to, and did, survive as an alcoholic with a chaotic lifestyle up to June 2007.
"There are now superimposed on RB's previous condition the grave physical and mental disabilities resulting from his accident.
"Mr Gordon states that RB wishes to resume his former way of life.
"No doubt he does.
"Nevertheless the risks of resuming that lifestyle are much greater than before.
"They include, for example, choking on his own vomit when he goes out drinking.
"Anyone in RB's situation needs to think carefully before he goes out and embarks upon a bout of heavy drinking.”