A British tourist jailed in Morocco for "homosexual acts" has returned to Britain to a tearful reunion with his family.
Ray Cole, 70, was last week sentenced to four months in jail after being arrested at a bus stop in central Marrakech in the company of a Moroccan man in his 20s.
Cole told reporters he was "relieved" to be home after his flight landed in London on Tuesday.
His family earlier announced that Cole would be released after their lawyers lodged an appeal against his sentence.
"We would like to thank each and every one of you, here and in Morocco, who has helped our campaign to secure the release of our wonderful father," the family wrote on the online campaign page for Cole's release.
"We would also like to thank the Moroccan authorities for showing compassion."
Cole's Moroccan companion however remained in prison, according to the Moroccan Association of Human Rights.
The group said the Moroccan had denied any sexual relationship with Cole, but that images of them together were found on their mobile phones, leading to their sentencing.
The two initially became friends on Facebook, and were arrested on Cole's second visit to see his companion.
Homosexual acts are punishable by up to three years in prison in Morocco.
Cole's detention had caused an outcry on social media, complaints by rights groups and calls for tourists to boycott Morocco.
The prosecution of foreign nationals on such charges is rare, but Britain's foreign office advises gay travellers to be aware of the risk.
A spokesman said the foreign office had offered "full consular support throughout his case and continue to do so".
"We remain in close contact with his family," the spokesman said.