An injured German cave researcher was brought out of the country's deepest cavern on Thursday at the end of a spectacular rescue operation that lasted nearly a week.

Germany Cave Rescue

A rescuer rappels in the the Riesending cave system in southern Germany. Johann Westhauser has been stuck a kilometre underground there since Sunday. (Markus Leitner/Bayerisches Rotes Kreuz/AP)

Johann Westhauser suffered head injuries in a rock fall June 8 while nearly 1,000 metres underground in the Riesending cave system, in the Alps near the Austrian border. Rescue teams embarked Friday on the arduous task of hauling him up through the labyrinth of narrow passages and precipitous vertical shafts.

After a short pause overnight, rescuers resumed work early Thursday morning and brought Westhauser the final 180 metres to the surface just before noon, Germany's mountain rescue service said.

A fit expert could scale the distance from the site of the accident to the entrance in about 12 hours, but rescuers had to haul Westhauser on a stretcher through the challenging terrain. The entrance to the cave is on a mountainside, some 1,800 metres above sea level.

Westhauser, whose condition has been described as stable, was being treated by medical experts outside the cave.