Six boys among a group of 13 trapped in a flooded Thai cave for more than a fortnight were rescued on Sunday, authorities said, raising hopes elite divers would also quickly save the others.
The first two boys emerged about nightfall from the Tham Luang cave complex after navigating a treacherous escape route of more than four kilometres (2.5 miles) through twisting, narrow and jagged passageways.
They were followed shortly afterwards by four others, leading to an explosion of jubilation on social media in Thailand and around the world as the rescued boys were rushed to hospital.
"Six of them came out," a defence ministry official, who asked not to be named, told AFP.
Foreign elite divers and Thai Navy SEALS on Sunday morning began the complex operation to extract the 12 boys and their football coach as they raced against time, with imminent monsoon rains threatening more flooding that would doom the mission.
"Today is the D-day. The boys are ready to face any challenges," rescue chief Narongsak Osottanakorn told reporters near the cave site on Sunday morning.
The group became trapped in a cramped chamber deep inside Tham Luang in a mountainous area of northern Thailand on June 23, when they went in after football practice and got caught behind rising waters.
Their plight transfixed Thailand and the rest of the world, as authorities struggled to devise a plan to get the boys -- aged between 11 and 16 -- and their 25-year-old coach out.
The rescue of the first six was a stunning victory in an operation Narongsak had earlier dubbed "Mission Impossible", and led to cautious optimism that the others would also be saved.
Another official involved in the rescue operation said the initial six who had been saved formed a first group.
A second group made up of the others had also begun the journey from the chamber where they had been trapped, a rescue worker told AFP.
The quick extraction came as a surprise after one of the operation commanders said on Sunday morning the rescue efforts could take several days to complete.
The group was found dishevelled and hungry by British cave diving specialists nine days after they ventured in.
Initial euphoria over finding the boys alive quickly turned into deep anxiety as rescuers struggled to find a way to get them out.
The death of a former Thai Navy SEAL diver who ran out of oxygen in the cave on Friday underscored the danger of the journey even for professionals.
After a short deluge of rain on Saturday night and with more bad weather forecast, Narongsak on Sunday said authorities had to act immediately.
"There is no other day that we are more ready than today," he said. "Otherwise we will lose the opportunity."
Between the base camp inside the cave and the trapped boys were twisting, turning cave passageways with torrents of water gushing through.
The water in the cave was muddy and unclear, with one diver comparing it to a cafe latte. Ropes were installed to help guide the boys through the darkness.
Narongsak said Sunday morning two divers would escort each of the boys out of the cave.
Officials had looked at many different ways to save the boys and their coach.
One early potential plan was to leave them there for months until the monsoon season ended and the floods subsided completely, but that idea was scrapped over concerns about falling oxygen levels and waters rising too high.
More than 100 exploratory holes were also bored -- some shallow, but the longest 400 metres deep -- into the mountainside in an attempt to open a second evacuation route and avoid forcing the boys into the dangerous dive.
American technology entrepreneur Elon Musk even deployed engineers from his private space exploration firm SpaceX and Boring Co. to help.
Meanwhile rescuers fed a kilometres-long air pipe into the cave to restore oxygen levels in the chamber where the team was sheltering with medics and divers.
On Saturday, Thai Navy SEALs published touching notes scrawled by the trapped footballers to their families, who had been waiting for them agonisingly close by outside the cave entrance.
The boys urged relatives "not to worry" and asked for their favourite food once they were safely evacuated, in notes handed to divers.
In one, Pheerapat, nicknamed "Night", whose 16th birthday the group were celebrating in the cave when they became stuck on June 23, said: "I love you, Dad, Mum and my sister. You don't need to be worried about me.
Mae Sai, Thailand | AFP