BEIJING (AP) — Crews in northern China have safely rescued 20 of 21 coal miners trapped inside a flooded shaft, with one still missing, officials said.

The accident happened about 11 p.m. Wednesday in Xiaoyi city in Shanxi province, a major coal-producing region southwest of Beijing.

State broadcaster CCTV showed rescue crews bringing the miners out one-by-one after loading them into waiting ambulances.

Xiaoyi’s Communist Party chief Zhao Jianxi and Mayor Yang Guang were sacked following the incident, state media reported. Police have also detained seven people in connection with the incident, CCTV reported.

The Emergency Management Ministry said 400 rescuers had worked around the clock for two days. Original reports had said 20 were rescued and one was missing, but the ministry put the death toll at two.

Rescuers pumped water out of the mine to facilitate the rescue.

China has cracked down on illegal mining in recent years, sharply reducing what was a high fatality rate, but a shortage of coal this year has driven up prices, prompting a surge in mining.