About 5am today a truck engine caught fire in Newmont Waihi Gold's Trio underground mine, leaving those working there trapped in three refuge chambers.
Mine spokesman Kit Wilson said 13 of the miners had left by 10.30am, but 15 remained underground in one refuge chamber deep in the mine.
Waihi Gold general operations manager Glen Grindlay said the remaining 15 were rescued before 12pm.
Mr Wilson said all the miners had followed procedure by heading to rescue chambers when the fire broke out.
"In coal mines you get out. In gold mines you wait it out."
He said three Newmont mines rescue teams had been on site, one in the mine and another two on stand-by.
The New Zealand Mines Rescue Service had also offered its assistance, he said.
Engineering, Printing and Manufacturing Union assistant national secretary Ged O'Connell said mine officials had contacted them to say an evacuation was "going well" at about 9am.
He said the final 15 miners reached the surface shortly before midday.
"We're very, very relieved everyone's out unscathed,'' Mr O'Connell said.
Waihi ward councillor Sel Baker said the refuge chambers in the mine were equipped to keep miners alive for up to 36 hours.
They were completely sealed and equipped with oxygen, water, communication and even packs of cards, he said.
"There could be a fire a couple of feet away and they'd still be okay.
"There's concern but there's no panic... I have no fear for the guys. They'll make it out."
Mr Baker said black smoke billowing out of the mine had reduced significantly by 11am.
He said the truck that caught fire would have had a payload of about 60 or 80 tonnes and wheel at least seven feet tall.
"These things can burn for quite a while."
All operations at the mine were stopped.
Security guards were in place at entrances to the mine and a public access way was blocked off.
Public tours of the gold mine were cancelled for the day.