Two men in yellow helmets peered down into the dark cavern as they slowly winched into view a bearded man strapped onto a stretcher and wrapped in styrofoam and a red sleeping bag to protect him from the freezing temperatures deep underground.

With a burst of applause, the most complex, ambitious and expensive rescue in Germany’s history came to an end today. More than 700 specialists rescued German spelunker Johann Westhauser, who was trapped for 12 days in one of Europe’s deepest cave systems.

Westhauser, 52, was 3,200 feet below ground when he was struck in the head and chest by a rockfall on June 8. The caver was unable to climb back to the surface on his own as the ascent involved steep vertical shafts and narrow tunnels.

Rescuers carried the injured man more than three miles underground by hand in relay teams of 15. Along the way they had to cross underground waterfalls and endure cave winds and near freezing temperatures.

“We were amazed by the solidarity in this operation. It’s like a great big family,” said Nobert Heiland, chairman of the Bavarian Mountain Rescue Servie. “A chapter of Alpine rescue history was written over the past 12 days.”

The Riesending cave - which translates to "massive thing" in German - in the Unterberg mountain range in southern Germany was discovered in 1995. It is the longest and deepest in Germany. A small hole in the ground through which explorers – and now rescuers – entered opens out into a labyrinth of caves, rivers and tunnels stretching for 19.1 km, or nearly 12 miles.

Caves are some of the last unexplored regions on Earth and much effort is put into trying to discover and enter them.

“People ask why did he do this? Why leave the safety of his house and explore a muddy flooded passage? It’s because he was a human,” said Richard Gregson, 52, a British eye surgeon and an experienced caver. “The urge to explore and find out what we don’t know is what distinguishes us from the beasts.”

When asked what it felt like underground Gregson said: “It’s a bit like mending the plumbing. You have to get into awkward positions and fiddle with things that lie in muddy water.”