Twelve Thai boys and their football coach who survived a dangerous rescue from a flooded cave have bade farewell to hospital staff after being discharged from hospital.

The "Wild Boars" team, aged 11-16, left Prachanukroh hospital after a farewell gathering with hospital staff to say thank you for taking care of them.

The footage, taken by staff at the hospital, shows members of the football team being cheered as they give emotional speeches.

Thai boys wave to camera in first video since cave rescue

The boys and their coach had planned to explore the cavern complex for an hour after football practice but heavy rain quickly flooded the cave, trapping the team inside.

'Thank you' say the 12 Thai cave rescue boys and their coach in video messages

After nine days, two British divers found the boys in a flooded chamber two miles into the complex.