Sgt. Major Saman Gunan wasn't abiding by any orders when he joined the effort to rescue a boys soccer team trapped in a cave in northern Thailand. The 38-year-old retired Thai Navy SEAL did so by choice.
Gunan, who was working as a volunteer, passed out underwater during an overnight mission placing extra air tanks inside the cave, along the route divers use to reach the cavern where the 12 boys and their coach remain stranded and the oxygen in the air is depleting. He couldn't be revived and was confirmed dead early Friday morning, according to Thai officials.
Gunan was a former member of the Royal Thai Navy's Underwater Demolition Assault Unit, which is colloquially known as the Thai Navy SEALs. After resigning from the unit, he worked as a patrol officer at Suvarnabhumi International Airport in Bangkok since 2006.
"He was a very capable SEAL and a triathlete who liked adventure sports. Although he resigned from the unit, he still loved and had a good connection with all the SEALs," the Thai Navy SEALs wrote in Thai in a Facebook post Friday, mourning the loss of Gunan. "Even the last part of his life, 1st Petty Officer Saman left us and this world while working with the SEAL brothers who are also trying to go forward and complete the mission as planned."
"His determination and good intention will always be in the heart of all SEAL brothers. Today, you get some good rest. We will complete the mission for you."
Gunan recorded a video of himself just moments before he boarded a plane to northern Chiang Rai province to join those assisting in the rescue operations at Tham Luang Nang Non, Thailand's longest cave. He says he wants to help "bring the boys back home."
"Loaded all my stuff on to the plane. I'm ready to fly to Chiang Rai," Gunan says in Thai on the self-shot video, obtained by the Associated Press.
"Supporting the frogmen who are working at Tham Luang in Chiang Rai. I'm from Suvarnabhumi Airport's support team of the company Airports of Thailand Limited. I'm going to help support this mission," he says. "See you at Tham Luang in Chiang Rai. May good luck be on our side to bring the boys back home."
Gunan's body was sent back to the naval base in Sattahib district, where the king of Thailand has ordered a funeral to be held with full honors, according to Thai officials.
His death marks the first fatality in the massive operation to rescue the group and underscores just how dangerous the voyage is going in and out of the cave, even for those who have experience.
"We can no longer wait for all conditions (to be ready) because circumstances are pressuring us," Thai navy SEAL commander Arpakorn Yookongkaew said at a press conference Friday. "We originally thought the boys can stay safe inside the cave for quite some time, but circumstances have changed. We have limited amount of time."
(MORE: Proposed ‘buddy dive’ plan to rescue boys trapped in Thai cave could launch this weekend: EXCLUSIVE) (MORE: FIFA invites boys soccer team trapped in Thailand cave to World Cup final) (MORE: Teammates who didn't go on ill-fated hike into Thailand cave don't blame trapped soccer squad's coach)The boys, between the ages of 11 and 16, hiked into the vast cave complex with their 25-year-old soccer coach after practice on June 23. It's believed that the coach often brought his team to the popular tourist site in Khun Nam Nang Non Forest Park for fun excursions.
As they ventured deeper into the complex, the sky opened up and heavy rain flooded the cave, cutting off their exit route. The group forged ahead before finding a dry, elevated slope where they were stranded in total darkness.
When the group never returned from the hike, Thai officials launched an extensive search-and-rescue operation involving more than 1,000 people, including specialists drafted from various nations such as Australia, China, Japan, the United Kingdom and the United States.
On July 2, two British cave divers found all 13 alive in a chamber about 3 miles from the cave's main entrance.
Thai-led rescue crews have been working around the clock to drain the flooded passageways and chambers within the vast cave complex leading to the elevated slope where the boys and their coach remain stranded.
Rescuers are now working around the clock on a strategy to extract them as safely, and quickly, as possible. Thai officials told reporters Friday that, currently, the main plan is to bring the boys and their coach out the same way they went in.
ABC News' Brandon Baur and Robert Zepeda contributed to this report.