Group of boys in cave with metallic blankets (© Royal Thai Navy Facebook Page/AP Images)
In this July 3 image, young boys and their soccer coach, trapped in a cave in northern Thailand, await rescue. The group was discovered nine days after getting stuck. (© Royal Thai Navy Facebook Page/AP Images)

Divers and rescue workers from around the world — including dozens of Americans — pitched in to rescue 12 boys and their soccer coach from a flooded cave in northern Thailand, where the team had been trapped for more than two weeks.

The rescue operation, which required days of meticulous planning, involved divers from the Royal Thai Navy’s Underwater Demolition Assault Unit, commonly known as the Thai Navy SEALs, and members of elite units from Great Britain, Australia, China and the United States along with representatives from other countries. An Israeli telecoms equipment company also helped with communications efforts, according to Wired.

Divers dispatched by the U.S. Indo-Pacific Command supported the operation by ferrying supplies into the cave for the stranded soccer players and helped prepare the cave system for safe passage. They also helped transport the evacuees — many of whom did not swim well — through the final section of the cave system, the U.S. Department of Defense said. About 40 American service members helped in the rescue effort.

At left, people standing around table looking at document (© Lillian Suwanrumpha/AFP/Getty Images). At right, people in diving gear (© Ye Aung Thu/AFP/Getty Images)
LEFT: A Thai military officer, second from right, briefs U.S. military personnel near Than Luang cave in Thailand’s Chiang Rai province during a rescue operation. (© Lillian Suwanrumpha/AFP/Getty Images) RIGHT: Thai divers carry supplies as rescue operations continue on July 5. (© Ye Aung Thu/AFP/Getty Images)

The risky nature of the rescue mission was underscored by the death of a former Thai Navy SEAL who ran out of oxygen after delivering oxygen tanks inside the cave.

Prior to their extraction, the soccer players (ages 11 to 16) and their coach received deliveries of food and other items from divers while rescue plans were formulated. A doctor also visited them to monitor their health.

The rescued boys and their coach have now been transported to local hospitals, where they are being evaluated before being reunited with their families. All are said to be in good condition, despite their ordeal.

“On behalf of the United States, I congratulate Thai authorities and their international partners on the inspirational rescue of the 12 brave young men and their coach trapped since June 23rd by rapidly rising water deep in Tham Luang cave in Chiang Rai Province,” said Glyn Davies, U.S. ambassador to Thailand. “Thais everywhere, their hearts filled with hope and joined by multitudes around the world, willed this singular success.”