Divers who rescued the Thai soccer team who were trapped in a cave first practiced on local children in a swimming pool.

The local kids who were part of the practice were around the same height and weight as the boys in the cave.

Divers found the group after nine days inside the flooded cave, but needed to rehearse the rescue because of treacherous conditions through the cave’s 2.5 mile (4 kilometer) long passages.

Divers who rescued the 13 members of the Thai soccer team that had been trapped in a cave for over two weeks first practiced on local children in a swimming pool.

The 12 boys and their 25-year-old coach had wandered into the Tham Luang Nang Non cave on June 23 after finishing soccer practice but became trapped after torrential rain. After nine days, divers found the group inside the flooded cave, but getting them out remained a challenge due to intensifying weather and treacherous conditions through the cave’s 2.5 mile (4 kilometer) long passages.

But part of the mission’s success appears to be the level of detail that went into rehearsing the rescue.

Master Sergeant Derek Anderson, a rescue specialist with the US Air Force, told the Associated Press divers practiced their action plan in a swimming pool on local children that were about the same height and weight as the boys inside the cave.

The aim was to learn how to “tightly package” each of the boys in order to easily manoeuvre them through tight passageways and adjust their air supply as needed.