A former Thai navy SEAL who was working to rescue the boys trapped in a cave in the country's north has died from a lack of oxygen, authorities say.

The 37-year-old man was placing oxygen tanks in the cave in preparation for the rescue attempt and lost consciousness as he tried to return, SEAL commander Arpakorn Yookongkaew said on Friday.

"We are trained to expect risks at anytime," Arpakorn said. "It's part of the job."