Rescuers found 12 boys and their soccer coach alive deep inside a flooded cave in northern Thailand on Monday, more than a week after they went missing.
There had been no contact with the boys, aged between 11 and 16, since they went missing with their 25-year-old coach last Saturday.
The massive rescue effort had been hampered by heavy rains that flooded the Tham Luang cave in northern Thailand, blocking access to chambers where it was hoped the group would be found alive.
But late on Monday Chiang Rai provincial governor broke the news of their rescue, delighting a nation which has anxiously followed every twist and turn of the dramatic effort to save them.
"We found all 13 safe ... we will take care of them until they can move," said Narongsak Osottanakorn, who broke into spontaneous applause and cheering.
"We will bring food to them and a doctor who can dive. I am not sure they can eat as they have not eaten for a while."
Divers took advantage of a brief window of good weather on Monday to edge further into the cave, with the water levels dropping slowly but steadily every hour thanks to round-the-clock pumping.
They had hoped to find the team on an elevated ledge dubbed "Pattaya beach".
But the boys had retreated 300-400 metres further as the ledge was submerged, Mr Narongsak said.
The team's travails appear far from over with a complex operation predicted to try to bring the group several kilometres through the cave - which is still partially submerged.
Loved ones, friends and teachers of the football team refused to give up hope of seeing the young players again, holding an increasingly desperate vigil at the cave entrance.
Tinnakorn Boonpiem, whose 12-year-old son Mongkol is among the 13, reacted with joy.
"I'm so glad ... I want to him to be physically and mentally fit. I am afraid he will be mentally affected by this incident."
Scores of divers - including foreign experts - have been sent into the cave with hundreds of oxygen tanks, establishing a base camp inside the chambers over the weekend.
Thailand's prime minister thanked international experts and rescuers who helped to locate the trapped boys and their coach.
The Prime Minister's Office said Prayuth Chan-ocha "wishes to thank the tremendous efforts of all international units that have come to assist the Thai authorities in rescuing the youth football team that was stuck in the caves in Chiang Rai. The Royal Thai Government and the Thai people are grateful for this support and cooperation, and we all wish the team a safe and speedy recovery."
Thailand has been a nation transfixed by the plight of the team, known as the "Wild Boar", with social media lighting up in support of the group and the country's deeply spiritual reflexes stirred into action.
Shamans and Buddhist monks have held prayers and given offerings at the cave, imploring mountain "spirits" to return the boys safely.
The football team went into the cave on June 23 after a training session and became stranded when monsoon rains cut them off from the entrance.
Rescuers found their bicycles, football boots and backpacks near the cave's entrance and discovered handprints and footprints further in.
At 10 kilometres long, Tham Luang cave is one of Thailand's longest and one of the toughest to navigate, with its snaking chambers and narrow passageways.
A sign outside the site warns visitors not to enter the cave during the rainy season between July and November.
In a region where mountains and caves all possess spirits in need of appeasing, the "Tham Laung Khun Nam Nang Non" cave - to give it its full name - comes with its own mythology.
It is better known as the "sleeping woman" mountain because the topography of the mountainside resembles the profile of a pregnant woman lying down.
Local lore has it that the cave is governed by the spirit of a pregnant princess, who killed herself with a hair pin after her commoner partner was executed, her blood forming the origins of the cave's waters.
"Please, forest spirits, please protect the children," one user wrote on Facebook, which became a go-to source of information and inspiration during the desperate search.
Memes showing the team being led out of the darkness, arms aloft, pinballed around social media, with a twitter hashtag translated as "the strangers we want to see most" trending.