Dozens of foreign divers and rescue personnel joined the 17-day rescue that captivated people around the world.
But immunity was granted only to Australian doctor Richard Harris and two medical assistants, said Foreign Minister Don Pramudwinai.
"We provided this only to Dr. Richard Harris and two medical assistants. Only to the Australian medical team," he said.
"We knew there were risks involved in this mission...so there was an understanding reached between the Thai government and the Australian government," Don added.
"The Thai government would like to thank Dr. Harris."
A spokeswoman for Australia's Department of Foreign Affairs and Trade declined to comment.
The success was tinged with bitterness, however, as Harris learnt his father, Jim, died in Australia shortly after the three-day rescue was completed last week.
Harris, an anaesthetist, went into the Tham Luang cave to assess the boys' health and was one of the last rescuers out of the cave after the boys, aged 11 to 16, and their 25-year-old coach were brought to safety.
Thai navy SEALs and an international team of cave-diving experts played a key role in bringing them to safety.
Samarn, who died after delivering oxygen tanks in the cave, was cremated on Saturday in a ceremony broadcast live on Thai television.
The boys wiped away tears as they signed a portrait of Samarn, in photographs released by the hospital on Sunday.
(This story has not been edited by Devdiscourse staff and is auto-generated from a syndicated feed.)