Here’s how the gruelling nine-day search in the 10 kilometre long cave filled with fast-flowing muddy floodwaters unfolded.
Saturday, June 23
The youngsters, aged between 11 and 16, and their 25-year-old coach went into the Tham Luang cave in northern Thailand after football practice. They were reported missing by a mother after her young son did not come home that night.
Local officials start to look for the boys after they are believed to have become trapped by heavy rains which cut them off from the main entrance.
They find bicycles locked to a fence and shoes and football boots belonging to the kids close to the entrance.
Sunday, June 24
Park officials and police kick into gear to find the boys and heavy rains continue to fall in the area near the Laos and Myanmar borders.
They find handprints and footprints believed to belong to the boys and think they likely retreated into the winding tunnels as they became hemmed in by rising floodwaters.
Relatives keep a vigil outside the cave where they will stay for nine days straight desperately awaiting news.
Monday, June 25
Thai Navy SEAL divers are in the cave searching for the boys, armed with oxygen tanks and carrying food.
Makeshift shrines are set up for parents to pray and make offerings.
Heavy rains continue, sparking fears that floodwaters within the cave could rise.
The boys are believed to have retreated further into the cave to an elevated air pocket called “Pattaya Beach”.
Tuesday, June 26
Divers reach a T-junction several kilometres inside the cave but are forced back by rushing floodwaters that clog a narrow crevice near Pattaya Beach.
Rescue operations run around the clock but it is a race against time as rains continue to fall.
Thailand’s junta leader Prayut Chan-O-Cha calls for the nation to support the rescue.
Wednesday, June 27
A team of more than 30 American military personnel from the US Pacific Command, including pararescue and survival specialists, arrive at the site late Wednesday.
They are joined by three British diving experts who go into the cave’s entrance but quickly retreat because of heavy flooding.
Continuing rains are causing flood levels to rise, and officials say conditions are “difficult”.
Thursday, June 28
The underwater rescue is temporarily halted because of the fast-moving floods inside the cave as downpours refuse to let up.
Water pumps are shipped in to drain the rising floodwaters that are so murky it is likened to swimming through cold coffee.
American experts get to work around the base, while the three British divers and others scour the mountain for alternative entrances into the cave.
Drones are dispatched to help find new chimneys.
Friday, June 29
A glimmer of hope as rescue teams find a possible opening, but there is no guarantee it will connect to the main cave network.
Prayut Chan-O-Cha visits the site and leads a meditation, jokes and cooks with relatives, asking them not to give up hope.
Saturday, June 30
A break in the bad weather allows divers to reach further inside the cave but they are still several kilometres away from where the boys are believed to be.
Teams continue to search for alternative openings above ground and rescuers conduct practice drills to safely evacuate the boys if and when they are found.
Sunday, July 1
Divers inch further into the cave taking advantage of the brief break in bad weather.
Rescuers set up an operating base inside the cave and hundreds of oxygen tanks and other supplies are pulleyed in. Divers can now stay remain underground for longer.
As the the sun breaks out, Chiang Rai governor Narongsak Osottanakorne says conditions for the operation are improving.
Monday, July 2
A miracle, finally: the 12 boys and their coach are found alive and safe about 400 metres further along from Pattaya Beach – which had become threatened by encroaching flood waters.
Crowds at the teeming rescue site cheer the good news and a nation breathes a sigh of relief.
But attention now turns to the difficult task of now getting the boys out safely.
The main priority is to get them food and first aid after nine days with little to eat in difficult conditions.
It could take days – or weeks – to get them out. Rescuers explore several options, including training them to use scuba equipment.