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
Chancellor George Osborne has announced a £500m investment for the Faslane naval base in Scotland, home of the UK's nuclear deterrent.
Five-times major winner Maria Sharapova has pulled out of the US Open tennis championships due to a leg injury.
Police are hunting for a mother who has disappeared with her 10-week-old baby.