When the world watched on as rescuers prepared to extract 12 Thai boys and their soccer coach from a flooded cave, the boy’s parents were told the children would be swimming to safety.

But ABC Australia Southeast Asia correspondent Liam Cochrane says in his new book, The Cave , the boys were drugged with ketamine and handcuffed on their journey to safety.

It took skilled divers from around the world and a detailed extraction plan to bring the Wild Boars soccer team out alive, after they explored the Luang Nang Non cave complex and became flooded in on June 23.

A new book has revealed how the Thai cave rescue actually happened. (AAP)

Correspondent Liam Cochrane describes how the boys were heavily sedated and handcuffed behind their backs with cable ties. (Harper Collins)

It was known that the boys were ‘mildly sedated’ to keep them calm , but the true extent of the process and the strength of the drugs was not clear.

“To calm nerves, the parents were told the boys were being taught how to dive and the media reported that each of them would be tethered to an air hose and then swim out with one rescue diver in front and another behind,” Cochrane writes in his book.

“The only hope was to sedate them, put oxygen-fed masks with silicone seals over their faces and let the expert cave divers carry them out.

An entire soccer team and their coach became trapped in a complex cave system in Thailand last June for two weeks. (AAP)

Mr Cochrane says the first boy, 14-year-old Note, was given a sedative, and injected in each leg with ketamine until he fell unconscious.

He was then placed in a diving suit, had an air tank strapped to him, and a mask put over his face, the book says.

He was then cable tied around the wrists and behind his back.

The medical team who worked in the rescue of 12 Thai boys who were stuck in an underground cave with their soccer coach. (AAP)

The same process was repeated for each child.