"I have received my freedom on my birthday. This is a gift after eight birthdays in detention," Mr Bandesh said on Friday evening.
The moment Farhad Bandesh was freed from eight years in detention
Thanking his supporters, he said he hoped those who are still detained will soon be granted their freedom.
"I thank all the people who supported me and fought for my freedom, and I wish for the freedom of all my brothers and sisters who are still imprisoned,” he said.
Mr Foster tweeted on Friday afternoon shortly after Mr Bandesh received news of his freedom.
He then tweeted a video of the two men hugging outside the Melbourne detention centre.
Mr Bandesh, a musician, was held on Manus Island for six years until his transfer to Australia under the medevac law in July 2019.
He spent nine months detained at Melbourne's Mantra hotel, an "alternate place of detention", before being transferred to MITA earlier this year.
Around 200 people transferred from Papua New Guinea and Nauru remain in detention.
The Asylum Seeker Resource Centre (ASRC) welcomed Mr Bandesh’s release, but called on the Morrison government to free the remaining detainees.
“We call on the Morrison Government to release all 200 people from indefinite detention urgently so they can recover their health, reunite with family and live freely in the community,” ASRC Director of Advocacy and Campaigns Jana Favero said.
”With the stroke of a pen, Prime Minister Morrison or Minister Dutton could end the harm and release people from detention today.
“After seven years in Australia’s abusive detention system, its time for the government to free people so they can have a safe, permanent home. Detention is unnecessary and cruel.”
Refugee advocate Jane Salmon described Mr Bandesh as a "force for democracy and harmony".
"This beautiful man deserves the best Australia has to offer and has already enriched and bonded us," she told AAP. "We are grateful to Mr Bandesh for his art, his defiant survivorship and his unsentimental friendship."
Two others were released from detention in Brisbane and Melbourne on Friday, while two walked free earlier in the week.
Another man released on Friday had been held at the Kangaroo Point Central "alternative place of detention" - an inner-city Brisbane hotel which has been used as a makeshift detention centre for over a year.
Protest in Brisbane to demand the release of asylum seekers detained at Kangaroo Point Hotel.
The medevac law was in force between March and December 2019, after the federal opposition and crossbenchers secured its passage against the government's will.
It allowed independent doctors to recommend the transfer of people held in Nauru and Papua New Guinea to Australia for medical purposes.
Many of the refugees brought to Australia under the medevac provisions have been held in detention since their arrival, while refugees medically transferred under other provisions have been released into the community.
- Additional reporting by AAP.