Updated

Officials say it could take weeks or months before the bodies of the victims of New Zealand's mining disaster are recovered.

Pike River Coal chief executive Peter Whittall said on Thursday the company was determined to recover the remains of 29 men who were declared dead after two explosions deep underground.

But there are still very high levels of potentially explosive gases in the mine that have made it too dangerous for anyone to enter since the first blast last Friday.

Whittall said various options were being considered to make the mine safe but it could take weeks.

Prime Minister John Key said it was possible the operation could take months.

THIS IS A BREAKING NEWS UPDATE. Check back soon for further information. AP's earlier story is below.

GREYMOUTH, New Zealand (AP) — Rescue teams were in full gear and ready to begin searching for 29 missing miners when toxic gas levels suddenly increased touching off an explosion that dashed all hopes of a rescue, a lost miner's brother and police said Thursday.

Prime Minister John Key declared the disaster a national tragedy, and across New Zealand on Thursday flags flew at half staff and many churches held services for people wanting to show respect for the miners.

Wednesday's massive explosion deep inside the mine on New Zealand's South Island came five days after the men were caught underground by a similar blast and only hours after rescuers reported their first progress in the rescue attempt.

A drilling team broke a narrow shaft through to the mine section believed to be holding the missing workers and two robots had crawled their way into the tunnel, providing the first view from inside the mine.

"She was all go," said Geoff Valli whose brother Keith, 62, perished in the mine. "There was going to be more than one or two (rescuers involved)" in the rescue bid.

"They explained just how close they were to going in. It was bloody scary. It could have been so much worse," he told National Radio.

But when toxic and explosive gas levels suddenly worsened, the first attempt to enter the mine since last Friday's initial blast was scrapped.

Even in the unlikely event that any one had survived the first one, police said no one could have lived through the second.

"The blast was prolific," said police superintendent Gary Knowles, in charge of the rescue operation. "Just as severe as the first blast."

The grieving families, the company and political leaders have all pledged to retrieve the bodies of the missing men.

Mourning father Laurie Drew was one of those pleading for their retrieval from the mine.

"We are just hoping the conditions for the rescuers will allow them ... to recover everything for us. Hopefully it doesn't drag on too long to get the closure that all the families really need, as well as myself," he said. His son Zen, 21, died in the disaster.

Pike River Coal chief Peter Whittall pledged to the families that the top priority was recovering the men from the pit.

"I still want them back and their families want them back and we'll be doing everything we can to make that happen. My love and support are with those guys," he said.

Prime Minister Key warned it could take time to recover the 29 bodies as there would have to be efforts to stabilize the mine before people could go in.

"We know there are a number of options being explored to allow the bodies to be removed from the mine," he said.

Key returned to Greymouth Thursday to meet with the grieving families to give them "comfort and support in probably their darkest hour."

A series of inquiries, including a formal Commission of Inquiry and police and coroner's investigations, are being launched into the tragedy over the next few days.

On Wednesday, shortly after the second blast, Whittall told the families a team had been getting ready to go underground — the families applauded, thinking that a rescue was about to start.

"I had to wait till they stopped clapping to tell them ... that the second explosion occurred," Whittall said afterwards.

Some relatives collapsed. Others shouted at the police in anger.

"It is our darkest day," said Tony Kokshoorn, the mayor of the nearby town of Greymouth, who was at the meeting.

Assistant police commissioner Grant Nicholls said that before the explosion, plans to enter the mine were in advanced stages.

"We were considering the (gas reading) assessments ... as to whether or not a team could go in," Nicholls said Thursday. "But that was simply not to be."

Wednesday's explosion happened with no warning, he said.

The mine was a toxic and explosive environment of carbon monoxide and methane, along with an ignition source that was likely smoldering coal, he noted.

"I can understand that people want to go in and go in quickly, but they are walking into a bomb," Nicholls told National Radio.

Officials had become increasingly pessimistic about the chances of pulling the men alive from the mine. Nothing had been heard from them since the initial blast.

Whittall said rescue teams were not doing anything that could have set it off, and conditions inside the mine were such it could have happened at any time.

"It was a natural eventuation," he said. "It could have happened on the second day, it could have happened on the third day."

It was one of New Zealand's worst mining disasters. The country's industry is relatively small compared to other nations and considered generally safe, with 210 deaths in 114 years after the most recent tragedy.

New Zealand's worst mine disaster was in 1896, when 65 died in a gas explosion at a mine on the same coal seam as the latest tragedy. The most recent was in 1967, when an explosion killed 19 miners in a mine near the Pike River site.