The extradition case against refugee footballer Hakeem Al-Araibi has been dropped and he is expected to be released from prison on Monday, Thailand's attorney-general's office has confirmed.
Director of the department's global affairs section, Chatchom Akapin, said Bahrain had requested that the case be dropped.
On Monday evening, Foster tweeted his thanks to Thai Prime Minister Prayut Chan-o-cha and his Government. He fled the country in 2014 before being granted permanent residence in Australia, where he has lived since.
Araibi was detained by Thai authorities on November 27 when arrived in Bangkok for a one week honeymoon with his wife. He has been living in Melbourne, where he plays for a semi-professional soccer team.
He said the extradition case against Mr Al-Araibi was dropped by the Criminal Court on Monday afternoon.
Western Sydney Wanderers have thrown their support behind detained refugee Hakeem Al-Araibi by removing a Thai Airways sponsorship board from their stadium. He said he believed he was targeted for arrest because of his Shiite faith and because his brother was politically active in Bahrain.