Efforts by local people to rescue the Tanzanian miners were abandoned last month after about a week, as hopes of finding them faded, reports the BBC’s Alice Muthengi from the main city, Dar es Salaam.

But faint cries alerted other miners working nearby that the group was still trapped underground, and search operations hurriedly resumed at the mine in the north-western Shinyanga region, some 900km (500 miles) west of Dar es Salaam.

Image copyright: Issa MichuziImage caption: The miners come from poor familiesImage copyright: Issa MichuzImage caption: They say the batteries of their torches went flat when they were underground

The 11 miners who were first trapped, and a colleague who went to search for them, were still missing, and presumed dead, Justus Kamugisha, the police chief for western Tanzania’s Kahama district, told the BBC.

The rescued miners were trapped some 100m (300 ft) underground after a shaft collapsed, the mining ministry said, the AFP news agency reports.

“The miners were very weak,” Minister of Energy and Mines spokeswoman Badra Masoud is quoted as saying.

“We survived by eating cockroaches, frogs and other insects as well as drinking dirty water that seeped in from above,” rescued miner Chacha Wambura told state-owned television.

He added that “batteries of the torches… ran out and we ended up in a cave that we earlier used as a store for our tools”, AFP reports.

Analysis: Alice Muthengi, BBC Africa, Dar es Salaam

Every so often, there are reports of miners trapped underground in rural parts of Tanzania which have have gold deposits. Villagers launch a search operation for a few days, and then give up, leaving the men to die.

A similar fate awaited the five – until their cries alerted other miners. They then told the local chief who mobilised the search party which found them.

There are many small gold mines in western Tanzania, most of them dug by villagers – including children.

If they find gold, they sell it to a dealer – and live off the money for a few weeks before going back underground.

The areas where the artisanal gold miners work is largely unregulated, with no health and safety considerations.

This is unlikely to change anytime soon – people have become accustomed to the harsh life on the mines, and hope that one day they will find such a large quantity of gold that it will change their lives forever.