Rescuers evacuate one of the 12 boys trapped with their soccer coach inside a flooded cave in northern Thailand. The boys were carried on stretchers through the labyrinth.Thai Navy SEAL/Associated Press

Rescuers evacuate one of the 12 boys trapped with their soccer coach inside a flooded cave in northern Thailand. The boys were carried on stretchers through the labyrinth.Thai Navy SEAL/Associated Press

MAE SAI, Thailand—One of the world’s most dramatic rescue missions appeared to take place like clockwork. It narrowly skirted disaster many times.

Early in the search for 12 Thai boys and their soccer coach, marooned several kilometers inside a flooded cave, rescuers unknowingly made it to within a few hundred meters of the group—only to be pushed back by rising waters.