(CNN) Medics who treated the 12 boys and their soccer coach rescued from a cave in Thailand last year credit the drug ketamine with playing a key role in the daring and dangerous mission to extract them.

According to details of the rescue released in a medical journal Thursday, the boys were given unspecified doses of ketamine, also known as party drug Special K, by the rescue divers as they were taken out of Tham Luang cave.

Reports at the time had suggested that the children, who had been trapped for two weeks, were sedated during the operation, but officials gave few details.

"We had to use the means that could keep the children not to be panicky while we were carrying them out," Thai Navy SEAL commander Rear Adm. Arpakorn Yookongkaew told CNN shortly after the rescue. "Most importantly, they are alive and safe."

In a joint letter to the New England Journal of Medicine , three Thai medics and an Australian anesthetist who was involved in the rescue said the boys also wore full-face masks supplying oxygen and poorly fitting wetsuits.