CHIANG RAI, Thailand — The boys who spent at least two weeks trapped a dark, damp cave waved to the world from their hospital beds on Wednesday in their first public appearance since they were saved.

All 12 teenagers, their soccer coach and four Navy SEALs who rescued them are well and recovering, said Chaiwetch Thanapaisal, director of Chiang Rai Prachanukroh Hospital.

A video clip showed some of the children giving the victory signs and sitting up in bed on a ward where they are being kept in quarantine.

Nurses tended to them and the boys responded with the customary Thai sign of respect — hands pressed together while bowing the head. Anxious and emotional parents watched and waved from behind a glass barrier.

"Don't need to worry about their physical health and even more so for their mental health," Chaiwetch said. "Everyone is strong in mind and heart."

The boys were rescued one-by-one in a complex operation involving international teams that began Sunday and finally ended Tuesday.

All the children survived, but a Thai Navy SEAL, Petty Officer Saman Kunan, died during the rescue.

The boys would have to stay in hospital for up to 10 days, Chaiwetch said. They would then need to recuperate at home for 30 days, he said.

Parents of the first eight boys freed have been able to visit them but had to wear protective suits and stand 2 meters (7 feet) away as a precaution. Authorities are worried about the possibility of infections picked up in the cave.

Meanwhile, two of the American servicemen involved in retrieving the young soccer players revealed the race against time as cold water, depleting oxygen levels and little visibility made the mission extremely dangerous.

“We knew if we didn’t act when we acted, there was not going to be a successful rescue,” Air Force Maj. Charles Hodges, told NBC’s "Today" on Wednesday.

Master Sgt. Derek Anderson, who was inside the cave during the rescue, added: “We can all be proud.”

The boys vanished June 23 with their 25-year-old coach after seasonal rains flooded the caverns and narrow passages, blocking their exit from the popular tourist destination.

Nine days later, two expert cave divers found the trapped group.

As they awaited rescue, they were given energy gels and baby food to help their bodies slowly adjust to solids.

Jetsada Chokdumrongsuk, a public health official, said Tuesday that the boys had been given antibiotics, rabies vaccines and vitamin B2, and showed no signs of fever or vision problems.

There was global jubilation at news of the rescue.

World leaders, including President Donald Trump, tweeted their good wishes, and the Manchester United football team invited the boys to their stadium.