Rescue workers have resumed efforts to free a team of schoolboy footballers and their coach from a flooded cave in Thailand.

Eight boys remain inside the Tham Luang caverns after divers guided four out safely in a high-risk operation late on Sunday, more than two weeks after the group became trapped.

The mission was halted overnight so air tanks placed along the treacherous network of tunnels could be replenished.

The boys freed on Sunday were hungry but in good health, authorities said. They are undergoing medical checks in hospital and because of concerns over infections are not yet allowed close contact with relatives, who were only able to see them through a glass partition.

The rescue operation involved the boys diving through the cave’s narrow, twisting and jagged passageways while tethered to their rescuers.

Authorities said the operation, which involved British divers, had gone “better than expected” and that the healthiest boys had been taken out first.

Thailand’s interior minister, Anupong Paojinda, said the divers involved in Sunday’s rescue would also take part in the next phase as they know best the cave’s conditions.

Chiang Rai governor Narongsak Osatanakorn said efforts resumed at 11am local time (4am GMT) on Monday and that authorities “hope to hear good news in the next few hours”.

Monsoon rains which bore down on a mountainous region of the the far northern province overnight did not raise water levels in the cave, where workers continue to pump water out, he added.

Thailand schoolboys rescue - in pictures Show all 21 1 /21 Thailand schoolboys rescue - in pictures Thailand schoolboys rescue - in pictures Police and military personnel use umbrellas to cover a stretcher near a helicopter and an ambulance at a military airport in Chiang Rai as rescue operations continue for those still trapped inside the cave in Khun Nam Nang Non Forest Park in the Mae Sai district. Four boys among the group of 13 trapped in a flooded Thai cave for more than a fortnight were rescued on July 8 after surviving a treacherous escape, raising hopes elite divers would also save the others soon. AFP/Getty Thailand schoolboys rescue - in pictures Thai rescue team members walk inside the cave Rex Features Thailand schoolboys rescue - in pictures An ambulance exits from the Tham Luang cave area AFP/Getty Images Thailand schoolboys rescue - in pictures A military helicopter carrying rescued schoolboys approaches to land at a military airport in Chiang Rai REUTERS Thailand schoolboys rescue - in pictures Rescuers hands locked with a caption reading "We Thai and the international teams join forces to bring the young Wild Boars home" where 12 boys and their soccer coach have been trapped since June 23 in a cave in Mae Sai, Chiang Rai province, northern Thailand. The operation has begun to rescue 12 boys and their soccer coach who will need to dive out of the flooded Thai cave where they have been trapped for more than two weeks, with officials saying Sunday morning that "today is D-Day. AP Thailand schoolboys rescue - in pictures A Thai policeman stands guard at an entrance of the cave as rescue operations continue for 12 boys and their coach trapped at Tham Luang cave at Khun Nam Nang Non Forest Park in the Mae Sai district of Chiang Rai province on early July 8, 2018. Thai authorities told media on July 8 to leave a camp site near the cave where 12 boys and their coach have been trapped for more than two weeks so that "victims" could be helped, possibly signalling a long-awaited rescue effort to get them out. AFP/Getty Images Thailand schoolboys rescue - in pictures Rescuers are seen drillining ahead of the operation at the Tham Luang cave complex, where 12 boys and their soccer coach are trapped, in the northern province of Chiang Rai, Thailand REUTERS Thailand schoolboys rescue - in pictures Rescuers are seen drillining ahead of the operation at the Tham Luang cave complex, where 12 boys and their soccer coach are trapped, in the northern province of Chiang Rai, Thailand REUTERS Thailand schoolboys rescue - in pictures Ruamkatanyu Foundation rescuers are seen drillining ahead of the operation at the Tham Luang cave complex, where 12 boys and their soccer coach are trapped, in the northern province of Chiang Rai, Thailand REUTERS Thailand schoolboys rescue - in pictures Thai policemen stand guard near a cave where 12 boys and their soccer coach have been trapped since June 23, in Mae Sai, Chiang Rai province, in northern Thailand Sunday, July 8, 2018. Thai authorities are racing to pump out water from the flooded cave before more rains are forecast to hit the northern region. AP Thailand schoolboys rescue - in pictures Journalists clear and prepare to leave the cave area during the 'D-Day' for the ongoing rescue operation for the child soccer team and their assistant coach to exit the cave at Tham Luang cave in Khun Nam Nang Non Forest Park, Chiang Rai province, Thailand, 08 July 2018. The officials' operations are underway to safely bring out the 13 members of the youth soccer team including their assistant coach who have been trapped in Tham Luang cave since 23 June 2018, out of the cave according to former Chiang Rai Governor Narongsak Osottanakorn said. EPA Thailand schoolboys rescue - in pictures Thai family members of missing football players and their coach (R) pass to meet with the officers during rescue operations to save a soccer team at Tham Luang cave in Khun Nam Nang Non Forest Park, Chiang Rai province, Thailand, 03 July 2018. According to Chiang Rai provincial Governor Narongsak Osatanakorn rescuers are taking supplies and food into the cave to sustain the team while there extraction is worked out. EPA Thailand schoolboys rescue - in pictures Rescuer walk out from cave where 12 boys and their soccer coach have been trapped since June 23, in Mae Sai, Chiang Rai province, in northern Thailand Sunday, July 8, 2018. Thai authorities are racing to pump out water from the flooded cave before more rains are forecast to hit the northern region. AP Thailand schoolboys rescue - in pictures Policeman line up on the main road leading to Tham Luang Nang Non cave on July 8, 2018 in Chiang Rai, Thailand. Divers began an effort to pull the 12 boys and their soccer coach on Sunday morning after they were found alive in the cave at northern Thailand. Videos released by the Thai Navy SEAL shows the boys, aged 11 to 16, and their 25-year-old coach are in good health in Tham Luang Nang Non cave and the challenge now will be to extract the party safely. Getty Images Thailand schoolboys rescue - in pictures Rescue workers along the main road leading to Tham Luang Nang Non cave as the first 2 ambulances carrying 2 boys pass by on July 8, 2018 in Chiang Rai, Thailand. Divers began an effort to pull the 12 boys and their soccer coach on Sunday morning after they were found alive in the cave at northern Thailand. Videos released by the Thai Navy SEAL shows the boys, aged 11 to 16, and their 25-year-old coach are in good health in Tham Luang Nang Non cave and the challenge now will be to extract the party safely. Getty Images Thailand schoolboys rescue - in pictures Thai medics and police officers evacuate the first two children with a helicopter after rescued from Tham Luang cave before heading to hospital, at a helicopter pad in Chiang Rai province, Thailand, 08 July 2018. Members of a children soccer team and their assistant coach who have been trapped in Tham Luang cave EPA Thailand schoolboys rescue - in pictures An ambulance transporting the children who have been rescued, arrives at hospital in Chiang Rai province, Thailand, 08 July 2018. The first six children have been confirmed to rescue on 08 July 2018 after have been trapped in Tham Luang cave since 23 June 2018. Four members of a children soccer team and their assistant coach who have been trapped in Tham Luang cave since 23 June 2018 have been rescued on 08 July 2018, according to former Chiang Rai Governor Narongsak Osottanakorn said. EPA Thailand schoolboys rescue - in pictures Ambulances transport boys rescued from Tham Luang Nang Non cave to hospital on July 8, 2018 in Chiang Rai, Thailand. Divers began an effort to pull the 12 boys and their soccer coach on Sunday morning after they were found alive in the cave at northern Thailand. Videos released by the Thai Navy SEAL shows the boys, aged 11 to 16, and their 25-year-old coach are in good health in Tham Luang Nang Non cave and the challenge now will be to extract the party safely. Getty Thailand schoolboys rescue - in pictures Medical staff await for the rescued Thai children at Chiang Rai Prachanukroh Hospital in Chiang Rai. The twelve missing Thai children and their adult coach went missing after entering a cave at Tham Luang, in Chian Rai Privince Thailand schoolboys rescue - in pictures Ambulances transporting children after being rescue from Tham Luang cave, arrive Chiangrai Prachanukroh Hospital in Chiang Rai province, Thailand, 08 July 2018. Six children of a child soccer team have been rescued on 08 July 2018 after 12 of them and their assistant coach have been trapped in Tham Luang cave since 23 June 2018. EPA Thailand schoolboys rescue - in pictures Ambulances transporting children after being rescue from Tham Luang cave, arrive Chiangrai Prachanukroh Hospital in Chiang Rai province, Thailand, 08 July 2018. Six children of a child soccer team have been rescued on 08 July 2018 after 12 of them and their assistant coach have been trapped in Tham Luang cave since 23 June 2018. EPA

Seven experienced cave divers from the UK involved in the rescue, expected to take up to four days.

“The UK divers are part of the core team, so they will be actively involved and that will include escorting each child out through the flooded passage,” said a British Cave Rescue Council spokesman.

“The operation is being supervised by the Thai authorities. They have had to make a quick decision because they are really concerned about the water level rising.”

Two rescuers accompanied each of the boys freed on Sunday, swimming the the caves “while holding the boys beneath their bodies,” Mr Narongsak. The rescuers are believed to have been forced to detach their oxygen tanks in order to pass through some of the tightest stretches.

The boys have only been learning to dive since 2 July, when they were first discovered perched on a ledge 2.5 miles inside the winding network of caverns.

Cave rescue experts consider an underwater escape to be a last resort, especially with people untrained in diving.

The death of a former Thai navy Seal on Friday underlined the risks. Saman Gunan, who was helping the rescue as a volunteer, and died on a mission to place oxygen canisters along the route.

Mr Narongsak said ahead of Sunday’s successful rescue dive that recent mild weather and falling water levels had created optimal conditions for an underwater evacuation.

However, he warned those conditions would not last if the rain resumes and that rain could shrink the unflooded space where the boys and their coach are sheltering. Heavy downpours began shortly after the four boys were pulled from the cave.

The potential for rising water and the dwindling oxygen levels has added to the urgency of getting the team out, although authorities said efforts to pump water out of the cave had so far been successful in offsetting the rain.

On Sunday night, Thai navy Seals posted a celebratory note on their Facebook page, saying: “Have sweet dreams everyone. Good night. Hooyah.”

The boys, whose team is known as the Wild Boars, became stranded when they were exploring the cave after a practice game on 23 June. Monsoon flooding cut off their escape route and prevented rescuers from finding them for almost 10 days.

The search and rescue operation has involved dozens of international experts, including a US military team.

Elon Musk said his Space X rocket company was testing a “kid-sized submarine” that could be sent to help the trapped boys.

He posted videos on Twitter of the aluminium sub being tested at a swimming pool. If the tests were successful, the sub was to be placed on a 17-hour flight to Thailand.

A spokesman for Musk’s Boring Co tunnelling unit, which has four engineers at the cave, said Thai officials requested the device, which could potentially help the children through narrow, flooded cave passageways.