The death toll in a coal mine disaster in western Turkey has risen to 238, the country's prime minister said, adding that the accident would be "investigated thoroughly".

At least 80 others have been injured while 120 remain trapped inside the mine in the town of Soma, Recep Teyyip Erdogan said on Wednesday.

"The accident is being investigated thoroughly. We will not allow any negligence," Erdogan said after visiting the site of the mine explosion in the town, about 250km south of Istanbul

Authorities said that most of the deaths in Tuesday's explosion were the result of carbon monoxide poisoning.

The energy minister said about 400 workers were involved in the rescue operation.

Television footage showed people cheering and applauding as some trapped workers emerged out of the mine, helped by rescuers, their faces and hard-hats covered in soot.

Al Jazeera's Caroline Malone, reporting from Soma, said hundreds of people - along with ambulances and fire engines - had gathered around the scene of the accident to try to help with the rescue effort.

"One of the largest concerns for the miners trapped is getting clean air to them. They [rescuers] were pumping clean air 12 hours ago and overnight to try and get rid of carbon monoxide, but the rescue effort had to be temporarily halted overnight because of the rising levels of carbon monoxide," she said.

Day of mourning

Erdogan, who postponed a one-day visit to Albania scheduled for Wednesday, declared three days of national mourning, ordering flags to be lowered to half-staff.

Our main priority is to get our workers out so that they may be reunited with their loved ones. Soma Komur Isletmeleri AS,

owner of the mine

The rescue effort was being hampered by the fact that the mine was made up of tunnels that were kilometres long, said Cengiz Ergun, the leader of Manisa province, where the town is located.

Hundreds of people gathered outside the mine and the hospital in Soma seeking news of their loved ones.

Interviewed by Dogan news agency, some complained about the lack of information from state and company officials about the situation of the trapped workers.

Police set up fences and stood guard around Soma state hospital to keep the crowds away.

Soma Komur Isletmeleri AS, 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.

Accidents are common in Turkey's mining industry, which is plagued by poor safety conditions.

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