1 of 5
Martin Mejia, Associated Press
Peru's President Ollanta Humala, center left wearing a white shirt, waves as he stands with nine rescued miners, wearing sunglasses, after they were freed from the Cabeza de Negro gold-and-copper mine in Yauca del Rosario, Peru, Wednesday April 11, 2012. The miners had been trapped inside since April 5.

ICA, Peru — Nine Peruvian miners were rescued Wednesday after six days trapped in an abandoned copper mine.

The nine, ranging in age from 23 to 58, walked out without assistance about an hour after dawn from a reinforced tunnel that rescuers had built as they removed more than 26 feet (8 meters) of dirt and rock.

The miners wore sunglasses and were covered with blankets. President Ollanta Humala greeted them.

Humala had spent the night at the mine 150 miles (240 kilometers) southeast of Lima.

The miners were trapped by a cave-in triggered by an explosion they themselves had set.

They had communicated with rescuers through a hose, in place before the collapse, by which they also received food and medicine during their ordeal in a horizontal shaft dug into a mountainside.

"It's pretty ugly inside," one of the rescued men, Edwin Bellido, told RPP radio. "We slept on the ground on muddy plastic."

He said the miners kept their spirits up by telling each other jokes, singing and running in the 160-foot-long (50-meter) tunnel.

The Cabeza de Negro mine that they were working had been abandoned in the 1980s.

Humala said the incident points up the dangers of working in such mines in Peru, labor in which tens of thousands are engaged. He said he had given instructions for Cabeza de Negro to be sealed definitively.

The rescue drew some comparisons to the 69-day ordeal of 33 Chilean miners trapped more than 2,000 feet (700 meters) underground in 2010 near the Chilean city of Copiapo.

The Peru rescue was not by any measure a comparable engineering feat because the miners were not similarly trapped deep beneath the earth. Neither heavy equipment nor drilling was required to extract them. Rescuers relied primarily on shovels, pick axes and wheelbarrows.

Alonso Navarro Cabanillas, president of the regional government, said that about 30,000 informal miners such as the ones who were trapped work in the Ica region.

Mining is the top economic activity in Peru, where 61 percent of all exports are associated with the sector. Peru is the world's No. 2 exporter of copper and the No. 6 exporter of gold.