A crowd of Turkish citizens looked on in a distraught state of shock as rescue workers pulled bodies out of a deadly coal mine explosion that occurred Wednesday in western Turkey. 

The explosion killed at least 238 workers, The Associated Press reports. 

More than 100 miners are still missing in what is one of Turkey's worst mining tragedies to date. 

Officials said most of the deaths were caused by carbon monoxide poisoning. 

Prime Minister Recep Tayyip Erdogan postponed a trip abroad to go to the coal mine, which is in Soma, a town south of Istanbul. The prime minister discussed rescue operations and tried to comfort two sobbing women. 

He also declared the next three days to be national days of mourning, with flags lowered to half-staff. 

According to Energy Minister Taner Yildiz, 787 people were inside the mine at the time of the explosion. So far, 363 have been rescued, although many were injured. 

"Regarding the rescue operation, I can say that our hopes are diminishing," Yildiz said. 

The last worker was rescued from the mine around dawn. As of 3:30 p.m. Wednesday, it had been 10 hours since any workers were brought out of the mine alive. 

Rescue workers brought body after body out on stretchers, with most of the victims' faces charred with soot. 

Officials said the explosion occurred when the miners were going to change shifts, which raised the death toll because there were more miners in the mine than usual. 

Turkey is no stranger to mining accidents due to the shoddy conditions of mines in the country. The worst disaster was in 1992, when a gas explosion killed 263 miners near the Black Sea port of Zonguldak. 

In Ankara, the capitol of Soma, police had to disperse a group of protestors who went to the energy ministry to protest the casualties. However, Turkey's Labor and Social Security Ministry said that the mine was inspected five times since 2012, including once in March of this year, and that there were no issues detected that violated work safety or security. 

The country's opposition party claim that Erdogan's ruling party voted down a proposal for an inquiry into a series of smaller incidents that occurred in Soma mines. 

Some miners who were on a different shift or working in other mines at the time of the explosion were lucky enough come out of the mine on their own. One man, who preferred to remain anonymous, said he led a 10-man team about a half-mile down the mine's tunnels and recovered three bodies. He said they had to run because the smoke from the coal had been lit by the explosion. 

Anxious family members were forced to identify the dead bodies as they came out of the mines and were put on stretchers. One man recognized one of the dead, and police had to stop the wailing man from going into the ambulance with the corpse. 

Officials stated that the explosion and fire were caused by a faulty power distribution unit. 

Some of the miners could not use elevators to escape the explosion because the explosion cut off power. 

Throughout the night, the crowd around the mine cheered and clapped as some workers emerged from the mine, while ambulances carried out injured workers and dead bodies. 

SOMA Komur Isletmeleri A.S., the company that owns the mine, said the explosion happened despite the "highest safety measures and constant controls" and said that an investigation will be launched to find out what went wrong. 

"Our main priority is to get our workers out so that they may be reunited with their loved ones," the company said in a statement.