The rescue operation of an unknown number of illegal miners trapped in an abandoned gold mine near Johannesburg stopped as darkness fell Sunday night, but police and mine security officials remained around the shaft to arrest anyone who came out, according to South Africa's emergency services.

At least a dozen miners were brought to the surface during the rescue operation, but an unknown number remained underground because they feared arrest, Werner Vermaak, spokesman for emergency services ER 24, told Reuters.

"Twelve have been rescued so far," Vermaak said.

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.

"Illegal mining is a crime, and once all miners receive medical attention, they are arrested," the country's Department of Mining Resources said on Twitter.

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, but later said this now appeared unlikely.

"At this stage, we doubt there are any more," he said.

Illegal mining common

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.

The Gold One spokesman, Grant Stuart, said the miners were trapped in the "New Kleinfontein 6" ventilation shaft, which had been closed off with concrete slabs.

"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.

With files from CBC News