INTERNATIONAL NEWS - The plight of the 12 boys and their football coach, and the work to free them, gripped the world's attention.
Four boys and the coach were brought out on Tuesday evening to complete the rescue mission, Thai navy divers said.
The group, a football team, got stuck deep inside the cave on 23 June after heavy rains caused flooding.
Aged between about 11 and 17, they became trapped during an excursion with their coach.
After they were found by divers last week, huddled in darkness on a ledge and cut off from the outside world for nine days, the race began to get them out before the weather deteriorated even further.
The first eight boys to be rescued, on Sunday and Monday, are still in hospital but said to be in good mental and physical health.
They have undergone X-rays and blood tests and will remain under observation in hospital for at least seven days.
Confirming the completion of the rescue operation, the Thai Navy Seals Facebook page announced: "All 12 Wild Boars and coach have been extracted from the cave. All are safe."
The football team's name is the Wild Boars.