Harry Nicolaides, an Australian writer jailed in Thailand for defaming its monarch, has returned home after being pardoned by the king and set free, BBC reported.
Mr Nicolaides, 41, had been sentenced to three years imprisonment in January.
The charges arose from a passage in a largely unknown novel he wrote in 2005, of which only seven of 50 copies printed were ever sold.
Mr Nicolaides was met by his family in Melbourne. He would next see his mother in hospital, his father told reporters.
Speaking at the airport in Melbourne, Mr Nicolaides thanked the Australian people for their support, the Associated Press news agency reports.
He told reporters he had been crying for eight hours, having only learnt moments before his flight that his mother had suffered a stroke while he was imprisoned.
"A few hours before that I was informed I had a royal pardon... A few hours before that I was climbing out of a sewerage tank that I fell into in the prison," AP quotes him as saying.
The Australian government had lobbied Thailand's royal family for his release.
Before he was jailed in January, the Bangkok court said a passage about an unnamed crown prince in the author's self-published fictional book, Verisimilitude, had caused "dishonour" to the Thai royal family.
The case had become a real cause celebre in Australia, says the BBC's Nick Bryant in Sydney, with Mr Nicolaides's imprisonment violating a basic Australian sense of fair play.
Images on television of him wearing prison clothes and in chains shocked many Australian viewers, our correspondent says.
According to Mr Nicolaides's lawyer, Mark Dean, the writer's release was the result of close co-operation between the Thai and Australian governments, our correspondent adds.
Thailand is a constitutional monarchy but has severe lese majeste laws.
Thai Foreign Ministry spokesman Thani Thongpakdee told AP: "This is not the first time that a foreigner has been granted a royal pardon. It is within his majesty's power to do so."