MAE SAI, Thailand — When the wail of the ambulance siren first reached the Thai village, people started cheering: The sound meant one of the boys trapped in a cave for more than two weeks was out at last and on his way to the hospital.

After more than a week of searching the flooded cave complex, and then days of planning a daring and increasingly desperate rescue, divers safely evacuated four of 13 members of a youth soccer team on Sunday.

Nine remained behind, waiting their turn to escape, as of early Monday morning. The boys on the team range in age from 11 to 16, and the coach with them is 25.

One by one, the first four to be rescued emerged after a treacherous, hourslong journey through the tight, underwater passageways of Tham Luang Cave. Skilled cave divers, part of a team assembled from around the world, hugged the four to their bodies as they swam through the dark.