New Zealand held a national day of mourning today for the 29 victims of its worst mining disaster in decades, while officials said it could be weeks or months before the bodies are recovered.

Recovery teams were prevented from entering the mine by high levels of potentially explosive methane and other toxic gases that have been blamed for causing two huge blasts inside the Pike River coalmine.

Mine operators said they were determined to bring out the men's bodies.

"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," said Peter Whittall, the chief executive of Pike River Coal.

Testing showed gas levels surged again soon after the second explosion yesterday and that another explosion was possible. Officials said methane was leaking from the coal seam, and a smoldering fire somewhere in the mine was producing other toxic gas and a potential ignition source.

Mining experts were planning to expel oxygen that could fuel a further explosion. One option was to pump in inert gas to displace the oxygen. Another was to seal the mine to stifle any burning then enter when it was safe, Whittall said.

The recovery effort could take weeks, he said.

Officials insisted after the first explosion last Friday that there was hope for the 29 men missing up to 1.5 miles underground. After yesterday's second blast, police and mine officials said no one could have survived.

New Zealand's mining industry is small and generally considered safe. The tragedy shocked the country and devastated families who had been buoyed by the survival tale of Chile's 33 trapped miners and clung to hope that their relatives could emerge alive.

New Zealand's prime minister, John Key, said experience overseas suggested the recovery operation could take months. He promised relatives of the victims a thorough investigation.

"They have accepted that their loved ones are gone but they want answers," he said.

Flags flew at half-staff across New Zealand, and church services were held for people wanting to show respect for the miners. In parliament, politicians wearing black passed a condolence motion.

A rescue team was in full gear ready to go into the mine and begin searching yesterday when gas levels suddenly spiked and the mission was called off. The explosion followed soon after.

"She was all go for the rescue effort," Geoff Valli, whose brother Keith was among those killed, told National Radio. "They explained just how close they were to going in. It was bloody scary. It could have been so much worse.".

Laurie Drew, whose son Zen died in the mine, said the families wanted the bodies to be recovered to help them grieve.

"Hopefully it doesn't drag on too long to get the closure that all the families really need," he said.

A series of inquiries, including a formal commission and police and coroner's investigations, are being launched.