MAE SAI, Thailand — Improbably enough, most of the escapes went flawlessly.
But on trip No. 11, to save one of the last soccer teammates stuck for 18 days deep inside the cave, something went dangerously wrong.
Rescuers inside an underground chamber felt a tug on the rope — the sign that one of the 12 boys and their coach would soon emerge from the flooded tunnels.
“Fish on,” the rescuers signaled, recalled Maj. Charles Hodges of the United States Air Force, mission commander for the American team on site.
Fifteen minutes went by. Then 60. Then 90.
As the rescuers waited anxiously, a diver navigating the 11th teammate through the underwater maze lost hold of the guide rope. With visibility near zero, he couldn’t find the line again. Slowly, he backtracked, going deeper into the cave to get his bearings before trying again.
At last, the survivor got through, safely.
It was a frightening moment in what had been a surprisingly smooth rescue of the soccer team, the Wild Boars, who had survived the murky darkness of Thailand’s Tham Luang Cave, sometimes by licking water off the cold limestone walls.
“The whole world was watching, so we had to succeed,” said Kaew, a Thai Navy Seal who shook his head in amazement at how every one of the rescues worked. “I don’t think we had any other choice.”
Interviews with military personnel and officials detailed a rescue assembled from an amalgam of muscle and brainpower from around the world: 10,000 people participated, including 2,000 soldiers, 200 divers and representatives from 100 government agencies.
It took plastic cocoons, floating stretchers and a rope line that hoisted the players and coach over outcroppings. The boys had been stranded on a rocky perch more a mile underground. Extracting them required long stretches underwater, in bone-chilling temperatures, and keeping them submerged for around 40 minutes at a time. The boys were even given anti-anxiety medication to avert panic attacks.
“The most important piece of the rescue was good luck,” said Maj. Gen. Chalongchai Chaiyakham, the deputy commander of the Third Army region, which helped the operation. “So many things could have gone wrong, but somehow we managed to get the boys out.”
“I still can’t believe it worked,” he said.
The risks were underscored last Friday when Saman Gunan, a retired Navy SEAL, died in an underwater passageway. Three SEAL frogmen were hospitalized after their air tanks ran low. Swift currents pushed divers off-track for hours at a time, sometimes tearing off their face masks.
More than 150 Thai Navy SEAL members, outfitted with improvised equipment sometimes held together with duct tape, helped create the escape route. A crew of foreign and Thai cave divers courted death every time they explored Tham Luang’s cramped chambers. Overseas military teams brought search-and-rescue equipment. The Americans provided logistics, while British divers navigated the most hazardous stretches.
Thailand’s new king donated supplies, and people across the nation volunteered in any way they could, cooking meals for rescuers, operating pumps to suck water out of the cave and hunting for hidden cracks in the limestone formations through which the Wild Boars could perhaps be lifted to safety.
But, most of all, the operation to save the team of 11- to 16-year old boys and their coach, said officials and divers, took bravery.
“I don’t know of any other rescue that put the rescuer and the rescuee in so much danger over a prolonged period of time, unless it is something along the lines of firefighters going into the World Trade Center knowing that the building is on fire and is going to collapse,” Major Hodges said.
Tham Luang Cave is a rare place where a person can become completely isolated. There is no GPS, no Wi-Fi, no cellphone service. The last known survey was conducted in the 1980s by a French caving society, but many of its deepest recesses remain unmapped. Spelunkers consider the cave one of the most challenging in the world.
When the search began, estimates of distances between key points were inaccurate and the location of landmarks uncertain, clouding even the most basic assumptions. Nevertheless, officials knew about Tham Luang’s dangers well and had placed a warning sign at the cave’s mouth against entering during the rainy season, when flash floods could inundate its chambers.
Rain was forecast for June 23, the day the Wild Boars made their excursion to Tham Luang, but the boys had ventured into the cave before. They left their bikes and soccer cleats and set off with flashlights, water and snacks bought to celebrate one of the boy’s birthdays.
The last of the boys would not emerge until July 10.
By the end of the first night, their parents were frantic. A contingent of Navy SEALs arrived 24 hours later, and began pushing their way into the flooded cave at 4 a.m. the next day.
But the Thai frogmen were accustomed to tropical open water, not the murky cold currents racing through the cave. They lacked the equipment, much less the expertise needed for caves, where divers cannot just rise to the surface should something go wrong.
On June 25, Ruengrit Changkwanyuen, a Thai regional manager for General Motors, was among the first volunteer cave divers to show up at the scene. Dozens would follow, from places including Finland, Britain, China, Australia and the United States.
Even for someone as experienced in cave diving as Mr. Ruengrit, the force of the water in Tham Luang shocked him, tearing his mask off when he failed to position himself directly facing the current.
“It was like walking into a strong waterfall and feeling the water rushing at you,” he said. “It was a horizontal climb against the water with every move.”
The Navy SEALs and volunteer divers painstakingly penetrated the cave, securing guidelines needed to ensure their safety. They found footprints that hinted at the soccer team’s trail. But as monsoon rains inundated the area, the porous limestone cave absorbed water like a sponge. Once accessible caverns flooded entirely.
“If you put your hand in front of you, it just disappeared,” said Kaew, the Navy SEAL who escaped the final deluge. “You couldn’t see anything.”
Deep within the cave, the water was so cold that the Thai divers’ teeth chattered while they rested during 12-hour shifts. Lacking proper helmets, the SEALs taped a medley of flashlights to their improvised headgear.
On the 10th day, July 2, with little hope of discovering anything but bodies, a pair of British divers working to extend a network of guide ropes popped up near a narrow ledge.
Suddenly, they saw 13 emaciated people perched in the dark. The Wild Boars had run out of food and light but had survived by sipping the condensation from the cave walls.
Elation at their discovery, however, quickly turned to anxiety. Capt. Anand Surawan, the deputy commander of the Thai Navy SEALs who was running an operational center in Tham Luang, suggested that the boys and their coach might have to stay in the cave for four months until the rainy season subsided.
Three Thai SEALs went missing during the operation for 23 hours, and when they finally reappeared, they were so weak from a lack of oxygen that they were rushed to the hospital.
Four days after the boys were found, Mr. Saman, the retired Navy SEAL who left his airport security job to volunteer, died as he was placing air tanks on an underwater supply route. His family declined an autopsy, but some Thai officials said that he ran out of air in his tanks. Others believe he succumbed to hypothermia.
“I’m very proud of him,” said Mr. Saman’s father, Wichai Gunan, a car mechanic. “He is a hero who did all he could to help the boys.”
Meanwhile, efforts to drain the cave, through pumps and a makeshift dam, began producing results. Crags and outcroppings emerged from the murk. The most waterlogged passage, which had taken five hours to navigate in the early going, could now be traversed in two hours with the help of guide ropes.
By last weekend, the rescuers were eager to act. Rain was back in the forecast. The oxygen level where the boys were sheltering had dipped to 15 percent. At 12 percent, the air might turn deadly.
The operation kept shifting with each variable: the water, the air, the mud, even the mental and physical state of the young soccer players. Because the boys could not swim, they needed full-face masks into which a rich oxygen mix was pumped.
But the masks that the American team brought with them were sized for adults. So they tested the gear on volunteer children in a local swimming pool, and discovered that by pulling the five straps as tight as possible, they would work.
The 30-strong American team, which was integral to the planning, recommended that each child be confined in a flexible plastic cocoon, called a Sked, which is marketed as a rescue stretcher and is a standard part of the Air Force team’s gear.
British cave divers navigated the wrapped boys through the trickiest underwater passages, while monitoring for air bubbles that proved they were breathing.
Prime Minister Prayuth Chan-ocha of Thailand said the boys had been given anti-anxiety medication.
“They just had to lay there and be comfortable,” said Major Hodges, the leader of the American team.
Once the boys completed the underwater portion of their journey, which took around two hours, the going was easier — though still challenging. Navy SEALs formed relay teams to lift the Wild Boars down steep slopes on which every step was slippery.
At one point, the plastic bundles containing the teammates were placed on the hoses for the water pumps, which acted as an impromptu slide. Rope lines hoisted the soccer team aloft so they could swing past particularly craggy parts of the cave. In one leg of the escape, the cocoons were placed on floating stretchers, and Thai frogmen pushed them along.
Kaew, the Thai Navy SEAL, was standing in the chilly flood of the cave on Tuesday night, swallowing his last bite of seafood-and-pineapple pizza, when he heard the yelled warning: More water was coming fast — get out now.
For three grueling days, he and his comrades had been hefting the 12 boys and their coach one by one through the series of slick and steep caverns to safety.
Just moments before the alarm, he had welcomed back the SEAL team that stayed with the boys for eight days on the rock where they had been trapped deep within Tham Luang’s flooded maze.
“The boys were safe, and my friends were safe,” said Kaew, who was not authorized to give his full name. “I thought, finally, the mission is a success.”
Then, when it was seemingly all over, a drainage pump to minimize flooding failed. What had been waist-high water surged to chest level in a vicious torrent where Kaew was standing, about a half-mile inside the cave’s mouth. The SEAL, who had no scuba gear with him, scrambled to higher ground, barely escaping the final deluge.
It was a chaotic finale to the rescue. Many of the divers and residents of the nearby northern Thai town of Mae Sai saw the last-minute flood as a sign that divine protection had ceased only after all were safe.