Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

More than 900 miners were rescued from a gold mine in South Africa after a severe storm knocked out power and stranded them underground overnight, the company which runs the mine said Friday morning.

Power was restored Friday morning and 955 miners who were still trapped in Sibanye-Stillwater's Beatrix gold mine were safely hoisted to the surface, according to a statement by the company.

The company had managed to restore power to two mine shafts Thursday morning and brought up 272 people from one shaft and 64 from the other, the company said in a statement Friday.

A rescued miner waves from a bus window carrying some of the hundreds of miners rescued Friday morning from the Beatrix gold mine after being trapped underground overnight following a power outage. Gianluigi Guercia / AFP/Getty Images

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

"Mine rescue and medical teams were mobilized and due care was taken to ensure employees were safe and had access to food and water," the statement said, adding that contingency plans were in place to evacuate the miners in the event that power was not restored.

Sibanye-Stillwater that employees who were trapped underground would receive thorough medical examinations and trauma counselling, together with their families, if needed.

"This is significant rescue effort and one that all who participated in, can be extremely proud off, and it is a clear demonstration of the competence within the South African mining industry," Sibanye-Stillwater CEO Neal Froneman said. "The actions taken by management and decisions taken resulted in all of our employees returning safely to their families."

Related: Robots are replacing humans in the world’s mines. Here’s why.

Mine security officials walk underground at Sibanye Gold's Masimthembe mine in Westonaria, South Africa on April 3, 2017. Mike Hutchings / Reuters file

The National Union of Mineworkers told Reuters early Thursday that the company was using a generator to help rescue workers.

"The problem is they are rescuing one mineworker at a time. It is very slow. It is worrying," NUM spokesman Livhuwani Mammburu told Reuters. "Some of our members have chronic conditions and they don't have medication down there."

Related: Trump says he loves miners but critics say he’s putting their lives in danger.

The Association of Mineworkers and Construction Union said in a statement on Twitter that it viewed the incident "as extreme due to the sheer number of workers involved."

"This incident also raises serious concern regarding the lacking emergency contingency plans at the mine for alternative and back-up power generation," the statement added.