Updated

A violent protest erupted Wednesday in Soma, Turkey, where an explosion and fire at a coal mine left at least 274 dead -- the worst mining disaster in the nation's history.

Tensions were high as hundreds of relatives and miners jostled outside the coal mine waiting for news, countered by a heavy police presence. Rows of women wailed uncontrollably, men dropped to their knees, sobbing, and others just stared in disbelief as rescue workers removed a steady stream of bodies throughout the night and early morning. Others shouted at Turkish officials as they passed by.

In downtown Soma, protesters mostly in their teens and 20s faced off against riot police Wednesday afternoon in front of the ruling NKP party headquarters. Police had gas masks and water cannons.

Many in the crowd expressed anger at Prime Minister Recep Tayyip Erdogan's government. Rocks were thrown at the police, who chased down some of the protesters. Other protesters shouted that Erdogan was a "murderer!" and a "thief!"

Police set up fences and stood guard around Soma state hospital to keep the crowds away from scores of injured miners.

In Istanbul, hundreds of demonstrators gathered outside the headquarters of the company that owns the mine, Soma Holding. In the capital, Ankara, police dispersed a group that tried to march to the energy ministry to protest the deaths, the Dogan news agency reported.

About 150 workers were still thought to be trapped in the mine. Authorities say the disaster followed an explosion and fire caused by a power distribution unit while the workers were preparing for a shift change, which likely raised the casualty toll because there were more workers inside the mine than usual. Reports said the workers could not use lifts to get out of the mine because the explosion had caused a power cut.

Officials say rescue efforts were hindered because the mine had not been completely cleared of gas, and the fire was still blazing inside the mine 18 hours after the blast. The air around the mine was still smoky.

"Regarding the rescue operation, I can say that our hopes are diminishing," Energy Minister Taner Yildiz said. He added that the deaths were caused by carbon monoxide poisoning.

"We fear the number could rise even further because those who came to help out may be among the injured and affected by the smoke,” Yildiz told reporters, according to AFP.

Yildiz said 787 people were inside the coal mine in Soma at the time of the explosion, and 450 of them had been rescued so far. There was no immediate confirmation of the company's numbers from Turkish officials, who earlier said 363 miners had been rescued. At least 80 miners were injured, including four who were in serious condition, according to Yildiz.

A rescued miner who emerged alive was whisked away on a stretcher to the cheers of onlookers.

An unnamed security source told AFP that there were pockets in the mine, one of which was open so rescuers were able to reach the workers. The source said the second pocket was blocked with workers trapped inside.

Workers from nearby mines were brought in to help the rescue operation. One 30-year-old man, who declined to give his name, says he rushed to the scene to try to help find his brother who was still missing early Wednesday. He said he was able to make it about 490 feet inside before gases forced him to retreat. With tears in his eyes, he said that there were still fires burning and that the missing workers had been inside too long.

"There is no hope," he said.

Turkish Prime Minister Recep Tayyip Erdogan declared three days of national mourning, ordering flags to be lowered to half-staff and postponed a one-day visit to Albania to visit Soma instead.

SOMA Komur Isletmeleri A.S., which owns the mine, said the accident occurred despite the "highest safety measures and constant controls" and added that an investigation was being launched.

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

Turkey's Labor and Social Security Ministry said the mine had been inspected five times since 2012, including in March 2014, and that no issues violating work safety and security were detected.

The country's main opposition party said that Erdogan's ruling party had recently voted down its proposal for the establishment of a parliamentary inquiry into a series of small scale accidents at mines around Soma.

Mining accidents are common in Turkey, which is plagued by poor safety conditions.

Yildiz said that if negligence was to blame for the disaster “we will not turn a blind eye to it. We will do whatever necessary, including all administrative and legal steps," according to AFP.

Previously, Turkey's worst mining disaster was a 1992 gas explosion that killed 263 workers near the Black Sea port of Zonguldak.

The Associated Press contributed to this report.