A desperate search for 12 Thai boys and their 25-year-old football coach has finally had success with all of those missing found alive.
The international search effort has gone on for more than a week, with rescuers repeatedly blocked by rising water that filled sections of the cave and forced them to withdraw for safety reasons.
Challenges still lie ahead, but here are the pictures that tell the story so far:
Rescue workers had to use water pumps and hoses Credit: AP
Exhausted Thai soldiers march out of the Tham Luang Nang Non cave Credit: AP
Prayer offerings were left for the missing boys as hope faded Credit: AP
A Thai Buddhist monk prays for the missing boys and their football coach Credit: AP
Soldiers carry a pump to help drain rising flood water from the cave Credit: AP
Mud and bad weather hampered the search Credit: AP
Relatives of the missing pray for the rescue of the 12 boys and their football coach Credit: AP
Buddhist monks join the prays for the missing Credit: AP
A drill machine is air-lifted in to help the rescue efforts Credit: AP
The Thai rescue team makes its way through the cave tunnels Credit: Tham Luang Rescue Operation Centre/AP
A rescuer makes his way past pumping equipment Credit: AP
US personnel brief members of a rescue team made up of participants from Thailand, China and Australia Credit: AP
The first images of the missing Thai boys emerge Credit: Thai Navy Seal via AP
The first images of the missing Thai boys emerge Credit: Thai Navy Seal via AP
Families of the missing react to the news their loved ones have been found Credit: AP