Rescuers have freed four boys who were trapped in a flooded cave in Thailand for more than two weeks, but have had to pause the operation, leaving eight other boys and their 25-year-old coach underground.

Efforts to rescue the others – who will then have to wind 2.5 miles (4 kilometres) through pitch darkness, trudge through thick mud, clamber over slippery jagged rocks and dive through narrow passageways swirling with cold, strong currents – will resume on Monday morning.

But the complex nature of the mission and the 11-hour round trip to the boys means it could take four days before all are free. “It’s dangerous to the most experienced divers to go through,” said one diver. “It’s pretty scary.”

Local media and military sources earlier said that five boys had left the cave and a sixth boy was about to emerge or may already have done so, but a correction was later issued to four boys.

At about 9pm local time, the official heading the rescue said the next phase of the operation would start in 10 to 20 hours. The boys are aged between 11 and 16.

The first two boys emerged about nightfall from the Tham Luang cave complex after navigating a treacherous escape route of 2.5 miles (more than four kilometres) through twisting, narrow and jagged passageways.

The first long section from where the boys have been huddling in darkness, which is over half a mile and almost one kilometre in length, is believed to be the most difficult.

It requires a long dive and crawling through mud and debris, with some crevices barely wide enough for a person.

“The hole is really small, I have to take off my air tank to crawl through it,” a 25-year-old Thai Navy Seal, who declined to be named, said before the rescue attempt. “As I do, I feel the edges of the hole on both my back and chest.”

Once past that stretch, the boys’ escape route forks east at a T-junction, with a tiny passageway close by that authorities say is the most dangerous element of the journey.

It is a sliver of space 1.2 miles (1.9 kilometres) from the shelf where the boys have been sheltering above the waters.

They must then scrabble over diverse terrain including giant boulders, sand and slippery rocks with sudden cliff-like drops and further submerged passageways.

The water in the cave is also muddy and unclear, with one diver comparing it to a cafe latte. Ropes have been installed to help guide the boys through the darkness.

An underground operations centre has been set up in the so-called “cavern 3”, after which there is a second journey of 1.2 miles (1.9km) to reach the mouth of the cave.

Dubbed “D-day” by the rescue team leader, the divers entered the wide cave mouth on Sunday morning to begin extracting the boys, accompanied by a whole contingent of emergency workers.

One cave explorer who has been inside the Tham Luang cave complex described it a “labyrinth”, adding it was much more difficult to navigate than any other he had experienced.

The mission was launched on Sunday because floodwaters inside the cave were at their lowest level in days, and rains that are forecast to hit the region risk flooding the cave again.

Narongsak Osottanakorn, head of the rescue mission, said 13 foreign divers and five members of Thailand’s elite navy Seal unit have been tasked with bringing the boys – some of whom are weak swimmers – through narrow, submerged passageways that claimed the life of a former Thai navy diver on Friday.

Narongsak said two divers would escort each of the boys out of the cave.

The British Cave Rescue Council, which has sent seven divers to assist in the rescue, said the death of the ex-avy Seal was a reminder of the risks.

“This demonstrates in stark terms, the dangers associated with the cave environment, especially those characterised by long sections of passage with deep water or those entirely filled with water,” the association wrote on its website.

The members of the “Wild Boars” team went missing with their 25-year-old coach after soccer practice on June 23.

They had set out on an adventure to explore the cave complex, reportedly for a picnic to celebrate one of their birthdays, before being trapped by rising waters from bursts of monsoon rain.

They have been stuck in a cramped chamber several miles inside the Tham Luang cave complex since then.

The rescue teams had rehearsed the plan for several days, said Narongsak, and they had to move now.

Initial euphoria over finding them alive quickly turned into deep anxiety as rescuers raced to find a way to get them out, with Narongsak at one point dubbing the effort “Mission Impossible”.

An Australian doctor who was part of Sunday’s rescue mission checked the health of the boys on Saturday night and gave the all clear for the rescue to proceed.

Authorities had looked at many different ways to save the boys and their coach.

One early potential plan was to leave them there for months until the monsoon season ended and the floods subsided completely, but that idea was scrapped over concerns about falling oxygen levels and waters rising too high.

More than 100 exploratory holes were also bored – some shallow, but the longest 400 metres deep – into the mountainside in an attempt to open a second evacuation route and avoid forcing the boys into the dangerous dive.