Thai nationals were the single largest group of foreign nationals held by Hamas in Gaza and the highest number killed in Israel - the fact that 17 were quickly freed is considered a diplomatic achievement.
Behind the scenes, Thailand officials have been quietly working away at trying to get their citizens freed, attending meetings in Qatar and Iran.
At the centre of the Thai negotiating team is Lerpong Sayed, a Thai Muslim who, in an exclusive broadcast interview, told Sky News Hamas was justified in taking hostages.
Dr Sayed in recent weeks has split his time between his home country and Iran, where he spoke to Hamas five times.
"We went there to negotiate as normal people, not politicians. Hamas saw this. They saw us as Thai Muslims," he told me in an interview that provides a window into his high-level talks.
"They promised that if there was a ceasefire Thai people would be released in the first group.
"Now we can obviously see Thais are among the first citizens freed compared to 20 other nationalities."
Dr Sayed is part of a small team of three people working on behalf of the Thai House Speaker, Wan Muhammad Noor Matha, and the Shia Muslim leader in Thailand, Syed Sulaiman Husaini.
Thailand's population of 70 million people is predominantly Buddhist and has largely peacefully co-existed with its sizeable Muslim minority.
On Tuesday, the Thai foreign minister went to Israel to meet with the hostages who were freed last week - the first group of captives released by Hamas as part of a truce deal with Israel.
The hostages are due to return to Thailand on Thursday.
Most went to Israel to work as farm labourers. On 7 October, when Hamas launched its attack, many were working in farms on the border. Before the war, 30,000 Thai labourers worked in Israel, predominantly in the agricultural sector.
Dr Sayed says the Thai government's talks with the Qataris partly helped secure the release of Thais, but he firmly believes it was Thailand's historic relationship with Iran that proved critical.
"I'd like to thank Iran - both the government and the people who have been supportive in negotiating with Hamas."
Other analysts have suggested an agreement mediated by Qatar and Egypt was the pivotal factor in securing the release of hostages.
Iran has said it facilitated the release, while Hamas said it was due to the efforts of Turkish President Tayyip Erdogan.
For his part, Dr Sayed is confident that the Thai hostages have been treated well.
He says he knows they've told their families "they were well taken care of, well looked after, given shelter, clothes, food and water and given mental support".
The negotiator insists there were no conditions from Hamas on what the hostages could or couldn't say, and dismisses the idea that the group, seen waving at hostages in increasingly highly produced videos, are using the hostage releases as a spectacle.
Controversially, he also says Hamas was justified in taking hostages.
It was, he argues, "to help the Palestinians", citing the thousands of Palestinians in Israeli prisons and decades of what he sees as Israeli occupation and mistreatment.
From what he has seen and heard from Hamas, he believes the rest of the Thais being held in Gaza will be released. According to the Thai government, there are 15 still being held in Gaza.
But he said Hamas had given him an ominous warning for the Thai people and the Thai authorities: "The border area is disputed land and it's war time and Hamas will consider anyone who works there is working for the outlaws."
They will be very alarming words for the many Thais who are now looking to return, and are financially dependent on the considerable extra money they make in Israel.