MAE SAI, Thailand — Twelve young soccer players and their coach were recovering well on Wednesday, a day after the last of them left the remote cave in Thailand where they had been trapped since late June, a Thai public health official said.

The official, Dr. Thongchai Lertwilairatanapong, the top public health doctor for Thailand’s northern region, told reporters on Wednesday that while some tests were still pending, all of the boys and their 25-year-old coach were recovering swiftly under quarantine in a hospital in the city of Chiang Rai.

“None of them are stressed,” he added. “They took care of each other well in the cave.”

After arriving, conscious, at Chiangrai Prachanukroh Hospital over the last few days, the boys received tetanus and rabies vaccinations as well as vitamins and antibiotics, Dr. Thongchai said. But he said they were in different stages of recovery because they had arrived in three separate groups, beginning on Sunday.