The Thai Navy SEALs confirmed all members of the team and their coach have been successfully rescued from the flooded passages.
They said they were waiting for a medic and three SEALs who stayed with the boys in their dark refuge deep inside the cave complex to come out.
The last remaining boys began emerging from the cave about 5pm Perth time.
The ninth and tenth boys emerged from the cave within minutes of each other and were carried on stretchers to waiting ambulances before being transferred to hospital.
They were followed by their last remaining teammate before the team’s soccer coach made it to a last staging area about 7.05pm Perth time, ending the team’s underground ordeal.
The boys and the coach were tonight being transported to hospital where they will join other members of the team in isolation as medical checks are carried out.
It is understood Australian anaesthetist Richard Harris administered a mild sedative to all of the boys prior to departing the ledge where they have been trapped, in order to eliminate any fear during the swim.
Earlier, Governor Narongsak Osotthanakorn said 19 divers were taking part in the final extraction.
"We hope that today we can bring out the four, plus one," said Governor Narongsak Osotthanakorn, referring to coach Ekkapon Chantawongse.
Thai Navy SEALs appeared to be in good spirits, posting on Facebook they were looking forward to celebrating success.
"Today is 10 July 2018. It will be longer than previous ones. We will celebrate together finally," they wrote.
The eight boys brought out by divers over the previous two days are in “high spirits” and have strong immune systems because they are soccer players, a senior health official said. Doctors were being cautious because of the infection risk and were isolating the boys in the hospital.
A medic and three Thai Navy SEALs who have stayed with the boys on a small, dry shelf deep in the flooded cave will also come out, he said.
“We expect that if there is no unusual condition ... the four boys, one coach, the doctor, and three SEALs who have been with the boys since the first day will come out today,” he told a press conference to loud cheering.
Nattawut ‘Tle’ Takamsai, 11, Monhkhol Boonpiam, 13, Prajak Sutham, 14, and Pipat Bodhi, 15, were the first of the boys taken to safety, surviving the treacherous journey through flooded underground rivers and arriving safely into the hands of medics on Sunday, in what has been dubbed a “masterpiece” mission.
Four more of the boys were carried on stretchers out of the cave on Monday, bringing to eight the total number brought out so far after two rescues in successive days.
Jedsada Chokdumrongsuk, permanent secretary at the Public Health Ministry, said the first four boys rescued are now able to eat normal food.
Two of them possibly have a lung infection but all eight are generally “healthy and smiling,” he said.
“The kids are footballers so they have high immune systems,” Jesada said. “Everyone is in high spirits and are happy to get out. But we will have a psychiatrist to evaluate them.”
It could be at least seven days before they can be released from hospital, Jesada said.
Family members have seen at least some of the boys from behind a glass isolation barrier, and Jesada said doctors may let the boys walk around their beds on Tuesday.
Jesada said they were uncertain what type of infections the boys could face “because we have never experienced this kind of issue from a deep cave.”
The boys have told the rescuers that there were no animals such as bats in the cave so the medical experts feel certain there is no biological cross-contamination.
The eight have been swabbed with samples sent to Bangkok.
“We have to wait for microbiological results from the lab,” said Dr Jedsada.
“They’re immune systems are weakened so it’s best they stay in hospital.”
The doctor said the boys will be able to watch the final stages of the World Cup in quarantine — but as to news about their rescue, the psychologists don’t want them to see the coverage until the final five are safely above ground.
This article originally appeared on PerthNow.