You are not permitted to download, save or email this image. Visit image gallery to purchase the image.
"Twelve have been rescued so far," ER24 spokesman Werner Vermaak told Reuters.
Those brought to the surface were checked by medics and then handed over to the police. There were no immediate reports of deaths or injuries.
Rescue operations ceased as darkness fell but private mine security guards were stationed around the shaft and police were also on hand to arrest any other miners who came out.
A police patrol in the semi-rural Johannesburg suburb of Benoni, where gold has been mined for decades, had been alerted by shouts from the trapped miners.
Vermaak initially said some of the trapped group had told rescuers that 200 more illegal diggers were deeper in the mine, and the exact number who remained was not known.
A crane was used to shift a large concrete slab that was obstructing the shaft belonging to the Chinese-owned bullion producer Gold One, which has prospecting rights to the mine but is not currently working it.
Illegal mining of abandoned shafts is common in South Africa, where informal miners excavate ore to sell, often living underground in dangerous and precarious conditions. Fatal accidents are common, and underground battles between rival groups have also been reported.
Gold One spokesman Grant Stuart said the miners had been trapped in the "New Kleinfontein 6" ventilation shaft.
"The illegal miners have dug a tunnel right next to it to access the shaft and it has collapsed behind them," he said, adding that heavy rain may have triggered the collapse.
Gold One delisted last month from the Johannesburg and Australian bourses after all of its share capital was acquired by BCX Gold Investment Holdings, a Chinese consortium.