Media playback is unsupported on your device Media caption Chief Constable Peter Vaughan: "The conclusion we have is the one none of us want"

The search for four miners trapped underground in a flooded Swansea Valley colliery has ended with the discovery of the last body.

They were working 90m (295ft) down in Gleision Colliery near Pontardawe on Thursday when tragedy struck.

The bodies of Charles Breslin, 62, David Powell, 50, Garry Jenkins, 39, and Phillip Hill, 45, who all lived locally, were discovered on Friday.

Prime Minister David Cameron said it was a "desperately sad situation".

The bodies of all four men have been recovered. They were discovered close together, one on the exit side of the blockage and the others in the area where they were working.

Three other miners managed to escape as the flood engulfed the drift mine when a retaining wall holding back a body of water underground failed.

Two of them then helped in the attempt to save their colleagues, while another was taken to hospital.

The body of one miner was located at the bottom of the main shaft at Cilybebyll early on Friday. The second man was found at 12:15 BST.

Police said at about 15:00 that a third miner's body had been discovered, and three hours later South Wales Police chief constable Peter Vaughan announced the fourth man had been found.

He said: "I can't begin to imagine what the families have been going through."

It was the end of a desperate race against time to find the four men, which began at 09:15 on Thursday when the emergency services were alerted.

Families of the miners gathered at the Rhos Community Centre a couple of miles away from the colliery as specialist rescue teams began working around the clock.

They tried to pump the water that was blocking the miners' exit.

The miner now in hospital had walked from the pit to tell rescuers of dragging and swimming through the water to the mine entrance.

The anguish of the families is intense David Cameron, Prime Minister

He had swallowed pit slurry and it is understood he collapsed before being taken to Morriston Hospital, Swansea.

Divers were sent in to see if they could reach the men but were forced back because debris made the water too murky. Oxygen was also pumped into the mine while sound detection experts tried to listen for signs of life.

The operation continued through the night, but hopes of finding them all alive were dashed when it was announced at 08:30 on Friday that the first body had been found.

Families remained at the community centre for much of the day, and there was early optimism that some of the men might have found an air pocket. But the situation worsened as more bad news emerged.

Media playback is unsupported on your device Media caption First Minister Carwyn Jones: "We thought the days of mining disasters were behind us"

Mr Vaughan thanked people for their messages of support, "not just in Wales and the UK but from all over the world".

"They say true community spirit comes out at the time of tragedy," he said.

Mr Vaughan said the rescue operation had ended with "the conclusion that none of us want".

Richard Smith, head of Mid and West Wales Fire and Rescue service, said all four men had been found in close proximity and they had been recovered from the mine.

"My gratitude to all the rescuers on the scene throughout the last two days," he said.

Prime Minister David Cameron said: "The anguish of the families is intense. There's going to be desperate sorrow".

Labour leader Ed Miliband said: "Of course there must be an inquiry and lessons must be learnt. But in the coming days we must think about those men who have died, the bravery of people who work in the mines and the terrible sadness of their families."

First Minister Carwyn Jones said: "I think this evening all we can do is to remember those families who have lost loved ones tonight and there will be many people around the world who will be standing shoulder to shoulder with them.

"They must now be left to grieve and of course we know they will face difficult times ahead after two days of waiting, which unfortunately led to the news that nobody wanted to hear."

Welsh Secretary Cheryl Gillan said there would be an investgation to "learn the lessons and find out what happened to these men" after a "truly devastating day".

"Their families told me that the unstinting compassion and support they have received from their friends, the local community and volunteers has been of great comfort to them," she said.

Archbishop of Wales Dr Barry Morgan, whose father was a miner, said prayers would be said in churches across Wales on Sunday.

"I remember from my boyhood the odd tragic accident," he said.

"These are close-knit communities, they rally round, these families won't be on their own," he added. "They really offer great support to one another".

Gleision Colliery, in operation since 1993, works coal under a very steep hillside above the banks of the river Tawe.

It is a small drift mine - a mine cut into the side of a hill, where the coal seam is accessed by walking in.