Sgt Danny Nightingale said outside court after being released: "Thank you to the world for being so kind".
His wife Sally said she was "very, very happy" and that she had "fought for this and got justice today".
More top news
The practice of sending mental health patients far away from friends and family for care has become endemic in the NHS, it has been warned.
Despite the use of combustible cladding in tower blocks, ministers were advised that regulations were tough enough, ITV News has learnt.
A milder night across the north than last night, with rain sneaking into southern Scotland from Northern Ireland.