Refugee footballer Hakeem Al-Araibi is set to return to Australia today after Bahrain withdrew a request to extradite him amid widespread pressure and an international campaign for his release.
A court in Thailand, where he had been detained for the past 70 days, approved a request to drop the proceedings against him.
Prime Minister Scott Morrison confirmed Al-Araibi has been released from prison and is due to fly home to Australia, where he has refugee status, later today.
"This morning the Ministry of Foreign Affairs informed us that Bahrain was no longer interested in this request," Thailand's Office of the Attorney General foreign office chief Chatchom Akapin said.
Today's announcement is considered a surprise as Al-Araibi, who appeared at a criminal court hearing last week, was expected to remain in jail for the next 60 days as his lawyers prepared his case against extradition.
Bahrain had previously remained defiant on its extradition request, with interior minister Sheikh Rashid bin Abdullah al-Khalifa claiming "external interference in the internal affairs of Bahrain is unacceptable" after a campaign was launched for his safe return to Australia.
Al-Araibi was fearful he would be tortured or even killed if he was ordered to return to Bahrain as he had been a vocal critic of its regime.
Flying to Melb to see everyone close to Hakeem, welcome him tomorrow. This is significant win for humanity, people everywhere standing up for good, pushing back against regimes who flout international law, for human rights. Gives us hope to help others, everywhere #Hakeemhome— Craig Foster (@Craig_Foster) February 11, 2019
He fled Bahrain in 2014 and was sentenced to 10 years in prison that year for allegedly vandalising a police station during Arab Spring protests in the Gulf country, charges he strongly denies.
Former Australia international Craig Foster, who led the campaign, thanked Thailand for allowing Al-Araibi to be released.
"My thanks go to the wonderful people of Thailand for your support and to Thai Govt for upholding international law," he wrote on Twitter.
"Most important thing now is Hakeem's immediate wellbeing.
"Sure Embassy staff will take care of him, there'll be tears there tonight, as there are in our household right now.
"This is significant win for humanity, people everywhere standing up for good, pushing back against regimes who flout international law, for human rights."
In a statement, Football Federation Australia (FFA) chairman Chris Nikou said the governing body "was extremely grateful to the Governments of Thailand and Bahrain for taking the decision to allow Hakeem to return to Australia".
The FFA was initially criticised for its initially slow response to the situation.
FIFA also issued a statement following the news, stating it was "extremely pleased" to see Al-Araibi released from prison.
"This is the outcome we have worked for together with a broad coalition of human rights organisations, governments and the wider football community over the past two months," world football's governing body said.
"We would like to sincerely thank everyone who has contributed to this outcome and, in particular, the relevant public authorities for doing the right thing and bringing Hakeem’s ordeal to an end.
"We wish Hakeem a safe return to his family and hope he will be able to resume his footballing career soon."