Antonio Diaz said the miners tried to cheer each other up inside the dark, cold shaft, attacking the slide with their picks by the light of helmet lamps. But after 24 hours, they began feeling hungry and some started losing hope.

"The sadness of feeling yourself trapped in a hole is immense, but I never lost hope," the 32-year-old miner said from a hospital bed in the town of Bonanza, near the El Comal gold and silver mine. "I kept thinking I was too young to die, and above all, I thought about my two daughters."

Bonanza Mayor Alexander Alvarado, a former miner who participated in the rescue efforts, said it took about 100 men working around the clock to reach those trapped and even then, it took about another two hours to bring the first miner out to safety.

"We kept telling them their families were waiting for them and to know that God was with them and was giving them a second chance in life," Alvarado said.

Two of the miners escaped shortly after the Thursday morning slide, and officials said another 20 were brought out late Friday. Mirta Lagos, an official of the ruling Sandinista Party who was at the site, said five families reported they have a miner missing.

The rescued miners were checked by paramedics and taken to a hospital in Bonanza, about 260 miles northeast of Managua. Interior Vice Minister Carlos Najar said they were a bit dehydrated but in good health.

Rosario Murillo, Nicaragua's first lady and government spokeswoman, said all 20 miners had been released from the hospital by Saturday afternoon.

The gold and silver mine is on a concession held by Hemco, which is owned by Colombia-based Minero SA. But the trapped miners themselves are freelancers allowed to work in the area if they sell any gold they find to the firm, said mining company spokesman Gregorio Downs.

Downs said the company had warned miners about the danger of working in the El Comal area, especially after two miners died in a landslide there last month.

"They told us digging here was risky, but sometimes one is willing to risk it for a few more cents," said Absalon Toledo, leader of the miners.