Onlookers cheered, "Hooyah moo pa!" - a reference to the name of the boys' soccer team, Moo Pa, or Wild Boars.
The rescue operation is estimated to take 10 hours and end by 9 p.m. local time. But the rains stopped on Monday, and the mission resumed at 11 a.m. local time.
But with oxygen levels inside dropping to risky lows and the prospect of heavy rain flooding the area completely, authorities decided they had to move quickly and take the group out through the water-filled tunnels.
The rescue operation was launched on Sunday and four boys were brought out that day. A family member told CNN Monday that they hadn't been told which boys had been pulled out, and who is still trapped in the cave.
"All the thirteen Wild Boars are now out of the cave", the Thai Navy SEALS said in a Facebook post confirming the entire soccer team had been rescued. Each of the rescued boys has been guided through the dark winding cave by a pair of divers. The rescued children were taken to the hospital, and officials said early Monday that they are strong and safe but need to undergo detailed medical checks.
Finally, Elon Musk tasked SpaceX engineers with crafting a special tiny submarine that could be used during the rescue, and the tech guru says the device is operational.
Speaking to reporters after the news conference, Narongsak said that while Musk's technology was "good and sophisticated", it was "not practical for the mission". Their families were being kept at a distance because of fears of infection, and the emaciated-looking boys were eating a rice-based porridge because they were still too weak to take regular food, authorities said. "They are now at the field hospital near the cave", Tossathep Boonthong, chief of the health department in Chiang Rai in northern Thailand, told Reuters.
Narongsak said ahead of the rescue dive that recent mild weather and falling water levels had created optimal conditions for an underwater evacuation.
On Sunday, four of the boys were extracted in a hard mission involving 13 foreign divers and five members of Thailand's navy SEAL unit. An international-level rescue mission began soon after, with hundreds of experts and military personnel from various countries arriving at the spot.
"You start to hallucinate, you see things, you hear things", said Dr. Robert Glatter, emergency physician at Lenox Hill Hospital.
The fifth boy was taken by helicopter to Chiangrai Prachanukroh Hospital in the provincial capital Chiang Rai, while the sixth remained inside a medical tent before being moved.
Kittichok Kankeaw, a teammate of Nattawut Takamsai, one of the trapped boys, said he would try to assist his friend to catch up at school.
The extreme danger of the rescue effort was underscored last week when a former Thai Navy SEAL, Samarn Poonan, died after he fell unconscious while placing oxygen tanks deep inside the cave. It is a race against the clock with heavy rain expected in coming days, which would again dangerously flood the tunnels.
Eight boys are still inside the cave and along with the team coach.