A former navy SEAL trying to rescue a Thai soccer team and their coach from inside a flooded cave has died, authorities said.

Samarn Poonan had been laying down oxygen tanks along a potential exit route for the 12 boys and their coach in the Tham Luang cave complex when his own supply of oxygen dwindled, SEAL Commander Arpakorn Yookongkaew told reporters Friday.

Poonan, an ex-member of Thailand's elite SEAL unit himself, fell unconscious less than a mile from the entrance of the cave in the Chiang Rai province.

“We won't let his life be in vain. We will carry on,” Yookongkaew said.

His death underlines the dangers involved in attempts to rescue the boys and their coach, who have been trapped for nearly two weeks in the 6-mile-long cave.

Officials had initially thought that they could keep up supplies of food and oxygen until conditions became safer. But with heavy rain expected over the weekend, the situation has become more urgent.

Handout . / Reuters

Rescue personnel work at the Tham Luang cave complex.

“We can no longer wait for all conditions [to improve] because the circumstance is pressuring us,” the commander added. “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.”

Officials have been exploring a series of options to bring the group out of the cave, which quickly became flooded after the team entered on June 23.

Those options include teaching the stranded team to dive, trying to drain water out of the cave, or drilling a hole to extract them from their location.

But with no solid plan set yet, officials have been trying to drain water out of the cave, as well as sending divers with supplies and oxygen to the team.

Salvador Hernandez is a reporter for BuzzFeed News and is based in Los Angeles.