A US man in Thailand who was arrested for writing a negative hotel review will avoid legal action and jail time.
Wesley Barnes had posted several reviews allegedly accusing the Sea View Resort of "modern day slavery".He was subsequently detained and charged under Thailand's strict anti-defamation laws.
Police said Mr Barnes and the resort had managed to reach an agreement, which included an apology to the hotel and to Thailand's tourism authority.
He was also told to send a statement to foreign media organisations that had previously written about his then possible arrest, including BBC News.
In it, Mr Barnes said that he apologised for his "repeatedly false and untrue statements... made to maliciously defame Sea View. These reviews were written out of anger and malice".
The statement said he regretted his actions, adding that "the hotel has forgiven me and agreed to withdraw the complaint".
Colonel Kitti Maleehuan, superintendent of the Koh Chang police station - the island where the resort is located - told the AFP news agency that both parties had met over a mediation session overseen by police.Mr Barnes will also have to provide "an explanation to the US embassy", said AFP - though it did not elaborate.
The hotel had said it would withdraw its complaint against Mr Barnes if he met all these terms.
Mr Barnes had ahead of the mediation session told news agency Reuters that he wanted to "end this case once and for all".
If found guilty, he could have faced up to two years in prison.
'Fabricated, recurrent and malicious'
Mr Barnes, who works in Thailand, had stayed in the Sea View resort earlier this year.
He is said to have got into an argument with staff over him wanting to bring his own bottle of alcohol while dining in the restaurant.
A hotel statement said he had "caused a commotion" and refused to pay a corkage fee which was eventually waived when the manager intervened.
Since leaving, Mr Barnes posted several negative reviews of the property, after which the hotel sued him for defamation.