Soon after the last of a dozen boys and their soccer coach were rescued from a cave in northwestern Thailand, the main pump used to clear passages of floodwaters failed, forcing more than 100 rescue workers to scramble to retreat from the area.
No one was injured in the ensuing chaos, but the dramatic culmination of the successful effort to save the boys — who entered the Tham Luang cave near the Thai-Myanmar border on June 23 and became trapped by torrential monsoon rains — underscores how close to disaster the rescue came.
"We have done what no one expected we could," acting Chiang Rai Gov. Narongsak Osottanakorn, who was head of the joint command center coordinating the rescue, said at a news conference on Tuesday as he praised the massive international effort.
Some 100 Thai, Australian, American and Chinese rescue volunteers, including 12 divers and an Australian doctor, had been inside the cave helping pass the boys, sometimes on stretchers, through a labyrinth of chambers and tight passages to the surface, according to the Bangkok Post.
By Tuesday night, they had all been taken out alive and apparently in good health, to the jubilation of Thais and people around the world.
"We are not sure if this is a miracle, a science, or what. All the thirteen Wild Boars are now out of the cave," the Thai navy SEALs team, which is helping to lead the operation, said on its Facebook page.
However, about three hours later and before the rescue workers had been cleared from the scene, the main pump stopped working, causing the water level to rapidly rise.
According to The Guardian, "The divers, stationed at 'chamber three,' a base inside the cave, said they heard screaming and saw a rush of head torches from deeper inside the cave as workers scrambled to reach dry ground."
"There were 100 guys running down the hill and the water was coming," one of the Australian divers helping with the rescue told Australia's Fairfax Media.
"You could see it rising," another member of the team said.
"Everyone, including the last three Thai navy Seals and medic who had spent much of the past week keeping vigil with the trapped boys, was out of the cave a short time later," The Guardian said.
For the first few days after the boys were discovered alive on July 2, getting to them was especially difficult. Reaching Chamber 3 required four to five hours and at least three dives deeper than 30 feet.
However, "by the end of the mission, as the water had decreased in the cave and as stairs were cut into mud banks and paths formed beneath guide ropes attached to the walls, the walk in took about 40 minutes," according to The Sydney Morning Herald.
The divers from the Australian Federal Police, or AFP, "usually perform black water search operations" and were therefore "unable to go beyond chamber three as they were held back by their equipment which would get stuck in even narrower spaces," the Herald reports.
Instead, the newspaper says, the AFP divers ferried oxygen tanks to the chambers so that others trained in cave diving and use smaller units, known as rebreathers, or side-mount tanks could get into the chamber that held the boys.
Speaking to Fairfax Media, one of the divers described the moment that the last navy SEAL emerged with the boys.
"[You] could hear all the cheers," he said. "It was like a Mexican wave when we got the last diver out, that's when the cheers and shouting happened."