American troops played an important role in recovering the boys during the multi-day rescue operation that dominated international headlines.

The entire Wild Boars soccer team, including 12 boys and their coach, was successfully rescued from a flooded cave complex in Thailand, where dozens of U.S. military personnel were deployed to assist in the operation.

The boys, ages 11-16, rescued from the Tham Luang Cave complex in northern Thailand were recuperating at a hospital in the nearby city of Chiang Rai, the Associated Press reported Tuesday.

The final rescue mission of the multiday effort was done on Tuesday, 18 days after the soccer team entered the cave and became stranded due to heavy flooding.

For the rescue, 42 U.S. military personnel and one member of the Joint U.S. Military Advisory Group Thailand were deployed to the multinational rescue effort, according to a Pentagon statement.

U.S. Indo-Pacific Command dispatched 36 service members from Okinawa, including airmen from the 353rd Special Operations Group and the 31st Rescue Squadron, to Thailand on June 28.

Since two specially trained volunteer British cave divers found the team in the cave complex last week, rescue plans were in the works.

The first four boys were rescued Sunday, followed by four more on Monday. The remaining four boys and their coach, along with three Thai Navy SEALs and a doctor who were staying with them, successfully exited the cave Tuesday. Each evacuee wore full scuba gear and was accompanied by two navy divers along the 2.4-mile escape route.

The U.S. military personnel involved in the rescue effort helped stage equipment and prepare the first three chambers of the cave system for safe passage, according to Pentagon spokesman Army Col. Rob Manning.

They also assisted in transporting the evacuees through the final chambers of the cave system and provided medical and technical assistance.

The celebration of the team’s rescue comes amid mourning for Saman Kunan, the former Thai Navy SEAL and volunteer diver who died early Friday while delivering oxygen tanks in the cave.

"The death of the former Thai Navy SEAL illustrates the difficulty of this rescue," Manning said in the DoD release. "His sacrifice will not be forgotten."