JAKARTA, Indonesia - An illegal gold mine in Indonesia's Sulawesi island collapsed on nearly two dozen people working inside, killing six and leaving another worker missing, officials said Thursday.

Survivors estimated about 22 people were trapped in the rubble when the mine in Central Sulawesi province's Parigi Moutong district collapsed late Wednesday due to unstable soil, said Andrias Hendrik Johannes, who heads the local search and rescue agency.

Rescuers were able to pull 15 people from the debris and recover the bodies of three women during a grueling search effort until Thursday morning, he said. Three more bodies of two men and a woman were found in the afternoon.

Police, emergency personnel, soldiers and volunteers were trying to locate one worker. Their efforts were hampered by the remote location of the mine and the unstable soil that risked further slides.

Video showed rescuers struggling to bring out a body bag from an inundated ravine.

Illegal or informal mining operations are commonplace in Indonesia, providing a tenuous livelihood to those who labour in conditions with a high risk of serious injury or death.

Landslides, flooding and collapses of tunnels are just some of the hazards in such mining. Much of the processing of gold ore involves use of highly toxic mercury and cyanide by workers using little or no protection.

Indonesia accounts for about 3% of world gold production. Most of that comes from the Grasberg mine in Papua province, said to have $40 billion in reserves and up to 20,000 workers.

But small, often unauthorized mining is on the rise in many parts of Asia and Africa. A study by the Intergovernmental Forum on Mining, Minerals, Metals and Sustainable Development found the number of people engaged in such mining had risen to over 40 million, up from 30 million in 2014 and 6 million in 1993.