The Thai caves where 12 boys and their football coach are trapped is a snaking system of caverns and crevices which pose a range of problems for rescuers.
Some stretches of the Tham Luang cave are more than 10 metres high, while others are a tight squeeze for a grown man.
Add the fact that part of the cave system is flooded, and water levels could rise, extracting the stranded group becomes an extra tricky task.
The group had already spent nine days in the cave with little food or light when they were discovered on Monday.
But their rescue could take months as they must either be taught to dive or wait for the water to recede.
So how they could get out?
Rescue divers with specialist breathing equipment reached the group through a series of water-filled passages. The boys may have to be taken out the same way.
The Thai Deputy Prime Minister Prawit Wongsuwan said rescuers were now teaching the boys how to swim and dive.
Rescuers are hoping to give the boys full-face masks and install dive lines and oxygen tanks along the tunnels, possibly with glow sticks to light the path.
The diving option is considered extremely dangerous by some, but British dive experts say the priority is to get the boys out before the rains bring more flooding and debris into the system.
Martin Grass, Chairman of the Cave Diving Group, says he expects the boys will be given full-face masks, light wetsuits and be shown how to use diving flippers, known as fins.
He said the rescuers instructing them would probably tell them not to hold their breath, to use their fins slowly and breathe gently.
Most people are familiar with scuba divers wearing air tanks on their backs, but cave divers tend to wear theirs to the side or below them to reduce the risk of catching on the roof of caves or obstacles.
Mr Grass says depending on the size of the boys, they may carry their own air bottle or a rescue diver may carry it for them.
“Each boy would have at least one or two rescue divers who would look after them to make sure they don’t panic,” he said.
The boys could also be tethered to a diver so there was no risk of them getting lost in the murky water.
“It could be a bonus that the boys are young. When you’re young, you feel invincible and they’d see it as a bit of an adventure,” he said.
The boys could spend 10 to 15 minutes under water at a time, depending how much of the passageways are flooded.
While the pumping continues to try to reduce the flooding, Mr Grass said he expected the advice from the British divers at the scene would be to get them out as soon as possible.
“With the monsoon coming, you don’t know how high that water will rise.”
A round-the-clock pumping operation is in place, taking gallons of water out of the caves. But however much they pump out, the water is being fed by sinkholes and stream in the hills above.
Authorities have tried to drill holes in the cave walls to help drain some of the flood water – although the thick rock has hampered efforts.
There have also been suggestions that drilling could be another way to get to the boys and airlift them out.
But to even begin the process, new roads would need to be built up above the caves to accommodate the heavy drilling equipment needed to break through the rock.
On top of that, Mr Mirza explains you would need to have conducted a survey of the caves and to know them back to front before you could start drilling – otherwise there would be little chance of digging a hole in the correct place for the boys and their coach.
“It sounds easy but it’s actually very difficult,” he says. “It’s a needle in a haystack problem.”
Waiting for waters to recede
The group could wait until the water levels drop – with food and other essentials delivered by regular diving supply trips.
Then, they could safely leave on foot.
But experts warn that this could take months, as the monsoon season sets in – and there is the chance the space they are living in could flood completely.
What are the dangers down there?
The boys, aged between 11 and 16, and their 25-year-old coach, are huddled on a small rock ledge. The environment is wet, so they must keep warm and dry or risk hypothermia.
Rock falls are a threat, but the main concern for rescue teams is rising flood levels. Storm waters could complicate access routes, threaten the supply of air into the chamber and hamper evacuation attempts.
While they wait to be freed, the boys must remain calm and stay on the ledge, says Andy Eavis, retired head of the British Caving Association.
If not, they could easily fall down a drop in the rock, or get washed away by the water.
Read more: What to do to survive underground
“Crawling around in the dark is the biggest problem,” Mr Eavis told the BBC.
What help are they being given?
Much-needed food and medical supplies – including high-calorie gels and paracetamol – reached the boys and their coach on Tuesday.
“(We will) prepare to send additional food to be sustained for at least four months and train all 13 to dive, while continuing to drain the water,” Navy Captain Anand Surawan said in a statement from Thailand’s armed forces.
Officials say most of the group are unhurt, although some are weak or have minor injuries. A doctor and nurse are with them, and will decide whether they are strong enough to be moved.
- Nine days of hope – images from the search
- Thailand rejoices as boys found
- The Brits who found the group alive
In the meantime, divers have been taking hundreds of oxygen tanks into the cave, and are preparing to establish a base camp inside the chamber.
How will they deal with mental strain?
“What is terribly debilitating in these situations is the darkness,” says Mr Eavis.
The boys may have had torches or lights on mobile phones, but they have potentially been sitting in the dark for hours, he says.
So rescue teams have been taking lighting into the chamber, and keeping the group company.
Divers have also been preparing power and telephone lines to enable the boys to speak with their parents.
“They’re mentally stable which is actually pretty good,” Ben Reymenants, a Belgian diver helping with the rescue operation, told AFP news agency.
“Luckily the coach had the sanity of mind to keep them all together, huddled together to conserve their energy, that basically saved them.”
Thai cave rescue: What next for the trapped boys?}