Divers have rescued the remaining four boys and their soccer coach from a cave in Thailand's north, bringing their ordeal to an end 17 days after they were cut off by floodwaters.

All 13 of the Wild Boar members are currently in hospital, where they will continue to be monitored.

The medic and the Thai Navy SEALs who helped the boys out of the cave have also exited the cave.

Chief of the rescue mission Narangsak Osottanakorn was cheered as he entered a press conference following the successful recovery over the last few days.

"We did something nobody thought possible," he said.

Here's how it happened.