BANGKOK — A Bahraini refugee was freed Monday afternoon after a court ordered that an extradition request to his country be withdrawn.

Footballer Hakeem AlAraibi was released from custody hours after the Criminal Court approved the withdrawal of an extradition request, for which prosecutors filed an appeal this afternoon. Media reports say the footballer left on a van immediately upon his release.

A source familiar with the case said the Thai government had bought AlAraibi a Thai Airways plane ticket for a flight back to Melbourne tonight.

Attorney Chatchom Akapin of the International Affairs Department said the Bahraini government withdrew its request to repatriate the refugee for a crime related to vandalizing a police station.

Australian Prime Minister Scott Morrison said Monday evening that it was grateful to the Thai government for the decision it had taken.

“We greatly respect the process that they’ve had to work through and we greatly appreciate their listening to the issues that have been raised by our Government and many others who have raised this case,” Morrison said.

He also thanked junta leader Gen. Prayuth Chan-ocha, adding that the relationship between the Thai and Australian government was very strong.

“As Prime Minister I’m pleased Hakeem is coming home and I’ll be pleased to see him at home when that occurs,” Morrison added.

Allan McKinnon, the Australian Ambassador to Thailand, welcomed the development in an email to Khaosod English.

“It’s very good news and I am so grateful to the Government of Thailand,” he said.

AlAraibi had been detained in Thailand since Nov. 27, where he was on a honeymoon. Thai authorities have said he was detained despite his refugee status in Australia due to an Interpol red notice followed by an arrest warrant from Bahrain.

The case triggered international condemnation from rights groups and football governing bodies, who have appealed for the footballer to be released, saying he faces torture if deported to his home country.

This is a developing story and may be updated without notice.