– The scrawny boys were huddled on the floor of the cave when the British diver emerged from the murky water.

As his light flickered from one boy to another, the diver called out, “How many of you?”

“Thirteen,” one of them answered.

“Brilliant,” the unidentified diver said.

After 10 days trapped in a flooded cave complex in northern Thailand, and after an enormous search effort that had transfixed Thailand, the missing 12 boys and their soccer coach had finally been found.

In the brief video, which was posted on the Thai Navy Seal Facebook page, the boys and their coach seemed in surprisingly good condition. Some of the boys sat and some stood as they spoke with the diver.

The group had been the focus of a search-and-rescue operation ever since they went missing in the cave complex on June 23 and were caught inside by rising floodwaters.

The next challenge will be getting the group out of the flooded cave in their weakened condition and without training as scuba divers. The boys range in age from 11 to 16, and their coach is 25.

The governor of Chiang Rai province, Narongsak Osottanakorn, who is overseeing the search-and-rescue operation, said a medical team would treat them and evaluate them to determine when they could be moved.

“I assure you we found them,” Narongsak told reporters. “After we have the doctor assess their condition, they are going to give them treatment for them to able to move. Then we are going to decide next how to move them.”

Divers were finally able to reach the group after enlarging a narrow, submerged passageway that had been too small for them to get through while wearing their air tanks.

Earlier, crews had used huge pumps to reduce the water level, and divers had placed guide ropes and air tanks along the route to reach the site of the trapped boys.

The search has riveted the nation, along with soccer fans around the world.

King Maha Vajiralongkorn Bodindradebayavarangkun had indicated he was following events closely, helping to focus the attention of government officials.

The boys’ first question when the diver arrived was whether they could leave right away. They also wanted to know how long they had been in the cave.

The diver explained the cave was flooded, and it would take some to get them out. But he assured them that other divers would soon be bringing food and supplies.

“Many people are coming,” he said. “We are the first.”

Kham Phromthep, whose son was among the boys trapped in the cave, said that he was ecstatic when he saw his son in the video.

“I am very happy to see his face among the other faces,” he said.