JOHANNESBURG - A methane gas explosion in a disused South African mine killed at least 31 people last month believed to be from neighbouring Lesotho, South Africa's energy department said on Friday.

The Department of Mineral Resources and Energy (DMRE) had said late on Thursday that South Africa was investigating the deaths, which occurred in a ventilation shaft in the shuttered Virginia mine in Free State province.

Lesotho's foreign ministry had reported the incident to Pretoria, it said.

The DMRE said an investigation into the incident with the help of Harmony Gold - the previous owner of the mine which ceased operations in the 1990s - determined that methane levels were very high in the ventilation shaft and an explosion had occurred.

"As such, it is currently too risky to dispatch a search team to the shaft. However, we are considering various options to speedily deal with the situation," it said.

A spokesperson for mining and energy minister Gwede Mantashe said it might take a while to retrieve the bodies as authorities did not want to risk losing more lives.

Illegal mining has plagued South Africa's mining industry for decades, robbing the sector and state coffers of billions of rand through smalltime pilfering as well as networks run by organised crime.

Informal mining is rampant in old mine shafts that lie abandoned decades after the country's gold rush.

"These guys are heavily armed, and that's the difficulty [with policing them]," said the mining minister's spokesperson, Nathi Shabangu, referring to the criminal gangs. "It is a big challenge, and cannot be solved within a day or overnight."

Harmony said it viewed the incident - which occurred in the third week of May - as a criminal matter and has handed it over to the South African police for further investigation.

"We were informed by one of the illegal miners (who survived) that there had been an explosion and that the incident resulted in loss of life," said Jared Coetzer, Harmony's head of investor relations.

Coetzer said the shaft was acquired in the mid-1980s but was closed shortly afterwards due to a methane gas explosion and was never used by the miner.

"We don't know how the people got to the place where the explosion occurred," he added.

Methane is a highly explosive greenhouse gas often found in underground mines and poses serious safety and health threats to mine workers.

Talks were ongoing between South Africa and Lesotho to retrieve the bodies and bring them home, said Thapelo Mabote, a spokesperson for the small mountain kingdom's prime minister.

A chief in the Berea district, from where most of the dead men hailed from, spoke on behalf of the bereaved families and said he had lost six of his men and was waiting for details.

"We don't want anything more than just to have those bodies retrieved and repatriated, that's all we are asking for," said Makhabane Peete.

In a separate incident on Friday, South African police said they were investigating the deaths of eight people suspected to be illegal miners who were found in Germiston, Gauteng province.

The bodies were found wrapped in white sacks by the roadside. When illegal miners die underground their colleagues sometimes retrieve the bodies and leave them in a public place for police to find, said police spokesperson Brenda Muridili.

(Additional reporting by Marafaele Mohloboli in Maseru; writing by Bhargav Acharya and Nellie Peyton; editing by Emelia Sithole-Matarise, Jason Neely and Louise Heavens)