The revelation shows just how dangerous the rescue mission was.
Two Australian divers who assisted in the Thai cave rescue mission were given diplomatic immunity in case the operation went wrong, the ABC has found.
According to ABC's Four Corners, both Craig Challen and Richard "Harry" Harris were given diplomatic immunity after negotiations between Australian and Thai government officials.
Diplomatic immunity - which is usually reserved for diplomats - would have offered both men legal protection from prosecution under Thailand's laws.
The decision speaks to what was considered to be a high-risk mission and the real threat of injury or death to the boys and their coach.
Dr Challen and Dr Harris were called in to help by Thai authorities soon after the boys were located.
"[The boys] were pretty unreservedly happy to see us, I think. I can't imagine what it was like for them being in there nine days with no contact," Dr Challen told Four Corners.
He also confirmed the boys were sedated.
"They did have some sedation to keep them calm, because the worst thing that could happen would be one of those guys panicking
"If you put me in a full face mask with no previous experience and dragged me out of a cave for, it's about a three hour trip, then I would be terrified and probably panicking as well."
Aussie doctor 'lynchpin' of rescue
The program spoke to several international divers who were involved in the mission. Each offered detailed insights into the dramatic rescue.
Member of the British Cave Research Council Diving Team Jason Mallinson said that without Dr Harris, the mission would have failed.
Without [Dr Harris], we wouldn't have been able to do what we did.
"He was the lynchpin of the whole operation. Without him, we wouldn't have been able to do what we did," he said.
"His bedside manner when he was there with the kids and that, talking to them, calming them down and stuff like that, he was the one that sort of sent them on their way and we were just the transporters."
Adelaide anaesthetist Dr Harris medically assessed the boys and helped prepare them for their trip out of the cave.
Mr Mallinson said the dangers of the situation were immense.
"The two things that were going to kill them was [if] the full face mask would become dislodged and they'd get water in the mask, and there was nothing we could do about that underwater. We didn't have a backup device for them. It was that mask or nothing," he said.
"The other thing is that if their air ran out.
"I've never done anything as risky as that and I don't think I ever will again. But it was the only option we had, and we took it."
Practice in a pool
While US Air Force Master Sergeant Derek Anderson said that in preparation, the team gathered some local children and practised in a nearby swimming pool.
"The children were absolutely happy to help. We had divers and Thai children practising swimming underwater, practising handing them off," he told the program.
Then inside the cave, Mr Anderson said they held practice sessions with the boys and their coach
"They'd get into the wetsuit. We'd put them in a buoyancy jacket, bring them down to the water, put them in the full face mask and check that the seal was good and make sure they were breathing okay."
The boys and their coach remain in the Chiang Rai Prachanukroh Hospital and are due to be discharged on July 19.