Hong Kong: The world is watching as emergency workers in Thailand prepare to rescue 12 boys and a football coach who were discovered in a flooded cave on Monday.

The sport of caving began in the British Isles in the late 19th century, and the first caving clubs were formed in England in the 1920s and 1930s, according to the British Cave Rescue Council, whose divers are involved in the rescue effort in Thailand. But as interest in caving grew, the council said, the risks of “accidents in places accessible only to fellow cavers increased in parallel.”

Here are a few tales of cave rescues that worked:

A cry for help, in a box

In 1983, eight amateur spelunkers were trapped in a Kentucky cave after a rainstorm caused a stream to rise, sealing their only escape route. Rescuers pinpointed their search after finding a note in a box — headlined “HELP” — left by the team’s co-leader.

“Been here since 11am Sat 4-23,” the note said. “Now Mon 4-25 12 noon.”

Hours later, the rescuers found the spelunkers waiting on a dry ledge, 450 metres upstream from where the box had been found, and gave them food and warm clothing.

“Everybody’s fine,” Tom Staubitz, the vice-chairman of the spelunkers’ club, told The Associated Press, as rescuers prepared for an evacuation. “They’re a little cold.”

Night of the 31 Pizzas

In 1991, caving expert Emily Davis Mobley was exploring Lechuguilla Cave, in Carlsbad, New Mexico, when a falling 40kg rock broke her leg.

More than 200 people took part in a 91-hour operation to save her, according to a Los Angeles Times report. At one point, they hauled Mobley, 40, up a 50-metre subterranean cliff.

During the rescue in the cave, which is among the deepest in the United States, emergency workers joked that they wanted pizza and margaritas delivered underground. And when Mobley surfaced, she was presented with one of the 31 pizzas that had been donated by local restaurants.

“Thank you very much,” she said. “Pizza’s good food for cavers.”

‘I am here and I am alive’

Gustavo Badillo, a diving instructor, was searching for a subterranean lake in Venezuela when he and a diving partner swam through waters with “the clarity of chocolate pudding,” as a 1992 report in The Orlando Sentinel put it. The partner turned around and made it back to the surface, but Badillo, then 31, remained trapped in an underground air pocket.

“I am here and I am alive,” Badillo shouted in the darkness. But no one appeared, and by the second day, he was contemplating suicide.

Two American divers later dove into the cave and emerged with Badillo in tow, 36 hours after his initial dive. He said he had been praying to the Virgin Del Carmen, who is also known as the Virgin of Miracles.

The rescue that got political

In 2004, when six British men headed into a Mexican cave with a larger group, they expected to return 36 hours later. Instead, floodwaters trapped them for more than a week — until they were saved by compatriots who had flown in to rescue them.

Five of the six men were soldiers, and Britain’s Defence Ministry said that their trip was purely for sport, according to a BBC report. Some Mexican press reports, however, said that the men had been looking for materials that could be used to make nuclear weapons.

Either way, Chris Boardman, the national safeguarding officer for the British Caving Association, said in a telephone interview, “they were properly embarrassed.”

Stuck in the Big Thing

It took 728 people to rescue Johann Westhauser, then a 52-year-old physicist, who was struck in the head by a rock while exploring Germany’s deepest cavern in 2014.

The cave, known as the Riesending, or Big Thing, stretches more than seven kilometres, and Westhauser was trapped 1,150 metres below ground.

The 11-day operation was complex, not least because the cave’s mouth sat atop a nearly 1,800-metre mountain, initially making it impossible for a helicopter to land. But rescuers eventually managed to lift Westhauser out on a stretcher.

“When we heard that it was successful, we fell into one another’s arms; the men cried,” Sabine Zimmerebner, a kindergarten teacher and cave explorer from Austria who participated in the rescue, told a reporter. “We were all overjoyed.”