Rescuers install a water pump inside Tham Luang Nang Non cave, where the team is located.

Twelve boys and their soccer coach have been found alive after disappearing in a flooded cave in Thailand 10 days ago, but it could be months before they can be rescued safely.

The provincial governor in Chiang Rai, Narongsak Osottanakorn, said that all 13 had been located in the Tham Luang Nang Non cave system in Northern Thailand, the Associated Press reported. The group was reportedly located between 300 and 400 yards beyond a section of cave that was on higher ground.

Rescue teams are searching for alternative entrances, and are attempting to drain water from the cave before removing the group. However, the military said that the process could take weeks, and that the group will be taught to dive in the meantime.

"[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, according to a statement from Thailand's Armed Forces.

An informal medical evaluation found that the stranded soccer team and their coach are all in a stable, or "green", condition, Osottanakorn said Tuesday morning.

"We found that most of the boys are in green condition. Maybe some of the boys have injuries or light injuries and would be categorized as yellow condition. But no one is in red condition," he said.

Pictures showed family members at the scene celebrating as they learned the news.

Sakchai Lalit / AP

Aisha Wiboonrungrueng, whose 11-year-old son, Chanin Wiboonrungrueng, was among those trapped, smiled and hugged family members after learning of the group's discovery, AP reported. The mother said she would make her son his favorite food, a Thai fried omelet, upon his return home.

The boys, between ages 11 and 16, and their coach from the Moo Pa soccer academy had not been seen since they went to explore the cave system on June 23.

It was thought that rising waters had trapped the group in the sprawling cave complex. Their disappearance sparked a huge search-and-rescue attempt by authorities that included specialist international diving teams.

In video footage from the rescue mission, a worker can be heard telling the boys that "many people are coming."

When the rescuer in the video asks the boys how many people are there and someone says 13, the rescuer can be heard responding, "Brilliant." At another point, multiple boys can be heard saying they are hungry and want to eat.

“Oh, they want to take a picture; tell him we’re hungry. I haven’t had anything to eat," one boy says in Thai, AP reported.

Linh Pham / Getty Images

Relatives pray after the 12 boys and their soccer coach were found alive in a cave.

The team's disappearance and the attempts to find its members have gripped Thailand, while anxious relatives have been maintaining vigils near the cave since the group went missing.

In the short term, rescuers will have to decide how and when to get the boys and their coach out. Anmar Mirza, an American cave rescue expert, told AP that bringing supplies into the cave and extracting the team members both present challenges.

"Trying to take non-divers through a cave is one of the most dangerous situations possible," Mirza said, "even if the dives are relatively easy."

Matthew Champion is a deputy world news editor for BuzzFeed News and is based in London.