Bangkok - Rescuers braced for a difficult evacuation for 13 members of a Thai youth football team found alive in a cave nine days after they went missing, as a phone cable was hurriedly fed into the underground chambers in the hope of allowing them to speak to their families for the first time since their ordeal began.

The 12 young boys and their football coach were discovered rake thin and hungry on a mound of mud surrounded by water late Monday, ending an agonising search that captivated a nation.

A team of Thai Navy SEAL divers - including a medic - have joined them on the bank, while rescuers pour over evacuation plans from the Tham Luang cave complex in northern Thailand before heavy rains return and raise the water level.

Much-needed food and medical supplies - including high-calorie gels and paracetamol - reached the group Tuesday as rescuers prepared for a prolonged extraction operation.

"A telephone line will be installed tonight... they (the boys) will be able to talk with their families via military phone," Passakorn Boonyarat, deputy governor of Chiang Rai province, told reporters late Tuesday.

He refused to speculate on how long they might be trapped, but explained that while there are enough provisions for four months, anyone fit and able to leave the cave would be evacuated as soon as possible.

"Any boys who are ready can come out first," via "chamber three" a cavern being used to as a base to store food, oxygen tanks and diving gear as well as plan the complex logistics of how to move 13 weak and inexperienced divers out of a partially-submerged cave.

Time may be against them given the region's incessant monsoon rains.

'Mission impossible'

The boys were discovered at about 10:00pm (1500 GMT) Monday by British divers some 400 metres (1,300 feet) from where they were believed to be stranded several kilometres inside the cave. As the first footage of the kids spread across social media in the early hours of Tuesday, jubilation erupted across a country which has been glued to each twist of the massive rescue operation. Video posted on the Thai Navy SEAL Facebook page, shows one of the boys asking the rescuers to "go outside".In response the British diver says: "No, no not today... many, many people are coming... we are the first."

"We called this 'mission impossible' because it rained every day... but with our determination and equipment we fought nature," Chiang Rai governor Narongsak Osottanakorn said Tuesday.

'Unimaginable' rescue

The harrowing task of getting the boys out is fraught with challenges.

An experienced SEAL diver takes around six hours to navigate the rugged, flooded kilometres-long course towards the entrance.

Experts say the risks of panic, drowning or an accident are high for young, scared and physically drained divers trying to negotiate the tight, winding passages.

If diving proves impossible, there is an outside chance a hole can be drilled into the cave to evacuate them or they will have to wait for waters to recede and walk out - the longest of the options.

Relatives led the outpouring of joy at the dramatic discovery of the boys perched on the muddy bank.

"I'm so relieved, though I still don't have the chance to see him... I want to tell him I'm still here waiting," Kieng Khamleu, said of her son Pornchai Khamleung inside the cave.

Another parent said he could hardly believe the good news.  "It's unimaginable. I've been waiting for 10 days, I never imagined this day would come," the father of one of the boys said. The "Wild Boar" team became trapped on June 23 after heavy rains blocked the cave's main entrance. Rescuers found their bicycles, football boots and backpacks near the cave's opening, and spotted handprints and footprints further in - leading them to the spot they were eventually found. 

Tham Luang cave is one of Thailand's longest, winding 10 kilometres (six miles) and is also one of the toughest to navigate - especially in the wet months. A sign outside the entrance warns visitors not to enter during the rainy season from July to November.

Why can't they swim out?

It is believed that most of the group cannot swim, complicating what would already be a difficult rescue.

Earlier, the Thai military said the boys would need to learn to dive - or wait up to four months for flooding to recede before they could get out of the caves, meaning food would need to be supplied for that time.

Interior Minister Anupong Paojinda later stressed the urgency of the evacuation, adding that rain was forecast "in the next few days", the Bangkok Post reported.

Attempts are being made to reduce the risk of further flooding of the caves by pumping water from the underground system, Mr Anupong said. A phone line is also being installed so the boys can talk to their families

The governor of Chiang Rai, Narongsak Osoththanakorn, said that "no risk" would be taken in rescuing the boys.

"We will not rush to take the lads out of the cave," he told reporters, adding: "Whoever has zero risk first can leave the cave first."

The governor said that requests had been made to build "infrastructure" in the cave leading to the pocket where the teenagers and their coach are located.

The Thai authorities have appealed for donations of full-face scuba diving masks small enough to fit the boys in order to reduce the risk of their breathing apparatus coming loose as they travel through flooded passageways.

How were they found?

Two British rescuer divers who had flown over to join the search operation found the boys on Monday night.

The boys are seen by torchlight sitting on a ledge above water, responding to the divers that all 13 were there and that they were very hungry.

They ask how long they have been underground and whether they can leave now. The divers tell them they have to wait, but say people will come back for them.

One boy replies: "Oh. See you tomorrow."

The search for the group had gripped the nation as it was unclear where they were or whether they were even still alive.

Families of the missing group were ecstatic at news of their discovery.

Thailand's Prime Minister Prayuth Chan-ocha said of the boys' discovery that "everybody is a hero". "Thank you all Thais, thank you all foreigners," he said.

How did they get there?

The boys, aged between 11 and 16, and their 25-year-old coach went missing on 23 June. It is believed they entered the cave when it was dry and sudden heavy rains blocked the exit. They were found on a rock shelf about 4km (2.5 miles) from the mouth of the cave. It is thought the boys could move through parts of the cave in dry conditions but rushing waters clogged the narrow passages with mud and debris, blocking visibility and access.