Al-Araibi, a 25-year-old former member of Bahrain's national football team, fled his home country for Australia in 2014 after he was accused of vandalising a police station. He was granted political asylum in Australia.
His case had been taken up by high-profile footballers including Didier Drogba and Jamie Vardy calling for his release. The Australian government, FIFA and the International Olympic Committee all lobbied Thailand.
Al-Araibi was expected to leave Thailand on Monday evening for Australia.
"Sure Embassy staff will take care of him, there'll be tears there tonight, as there are in our household right now," Foster tweeted.
"My thoughts are with Hakeem's wife. Her nightmare will shortly be at an end. Our prayers answered #Hakeemhome," he added, thanking "everyone who stood for what's right".
As Australia repeatedly demanded his return and Bahrain slammed external interference in its internal affairs, Thailand insisted Al-Araibi's case had to go through the required judicial process and that it had been caught in the middle, according to Efe news.
"We are newly wed and my husband wanted to do something special for us... We travelled together excited to arrive in Thailand, only to be met with imprisonment and the threat for my husband to be sent back to Bahrain where his life will be in danger," Araibi's wife said from Australia in the letter delivered to the government by his lawyer.
"His future lies in your hands... Please save my husband,""she had said.
(This story has not been edited by Business Standard staff and is auto-generated from a syndicated feed.)