The death toll from a coal mine explosion in northern Turkey has risen to 41. Relatives waited for news all night outside the state-owned Turkish Hard Coal Enterprise’s (TTK) mine in the town of Amasra, in the Black Sea coastal province of Bartin. Turkish President Recep Tayyip Erdogan arrived at the scene on Saturday and attended the first funeral. "Our priority was to find the miners in the gallery. We finally reached the last one. He also died, bringing the number of deaths to 41," Mr Erdogan said, ending rescue operations after more than 20 hours. “We will determine how the explosion happened, and whether there is anyone responsible, through administrative and legal investigations,” he said. Eleven miners were injured and taken to hospital, with five in serious condition, while another 58 managed to get out of the mine unaided or were rescued unharmed, officials said. Energy Minister Fatih Donmez said: “We are approaching the end of the rescue operation.” Mr Donmez said the explosion caused a fire in the mine's gallery, where most of the trapped miners were located. “Around 10 to 11 people are in the area where the fire is continuing. It’s not a huge fire, but (for rescuers) to get there safely, the fire and carbon monoxide gas must be eliminated,” he said. “There are partial cave-ins in some areas. We evaluate that our other four or five workers are trapped in cave-ins.” Interior Minister Suleyman Soyl said 11 of the rescued miners were being treated in hospital. “Six were taken to city hospitals in Istanbul by ambulance planes of the Ministry of Health and they are being treated there. Five injured are currently in Bartin,” he said. The UAE has expressed its sincere condolences and solidarity with the Republic of Turkey for the victims of the mine explosion. The Ministry of Foreign Affairs and International Co-operation expressed its sincere condolences and sympathy to the Turkish government, its friendly people, and the families of the victims, wishing a speedy recovery to all the injured. Recai Cakir, mayor of Asmara, said some of the survivors suffered serious injuries. Television footage showed anxious crowds around a damaged white building near the entrance to the pit to await news of friends and loved ones. Turkey's mineworkers' union Maiden Is said the explosion was caused by a build-up of methane gas, but officials said it was too early to draw definitive conclusions over the cause of the accident. The national disaster management service said the spark that caused the explosion appeared to have come from a malfunctioning transformer. It later withdrew that report and said methane gas had ignited for “unknown reasons”. The local public prosecutor's office said it was treating the incident as an accident and launching an investigation. Turkey suffered its deadliest coal mining disaster in 2014, when 301 workers died in a blast in the western town of Soma.