Twenty-eight miners have been rescued from New Zealand's Trio gold mine in the North Island town of Waihi after a fire trapped them underground for more than five hours.

The miners were forced to take shelter in three underground refuge chambers after a truck engine caught fire at about 5am local time (16:00 GMT) on Monday.

They were trapped for about five hours after the accident while the ventilation system pumped smoke through the mine, until rescuers reached 13 miners in two of the chambers, Gold producer Newmont said. 

New Zealand media reported the remaining 15 in the third chamber were brought to the surface by about midday.

Initially, 28 men were trapped about 150 metres underground in safety chambers. 

Kit Wilson, the mine spokesperson, said one man was being checked by medical officials for suspected smoke inhalation but the rest are fine.

"Apparently they are all in good spirits and are raring to go home and have a sleep," he said.

The men were two hours from finishing a 10-hour overnight shift when the fire broke out.

Wilson said that the cause of the fire in the diesel engine was not yet clear and that diesel vehicles regularly enter the mine.

The mine is owned by Denver-based Newmont, one of the world's largest gold producers. Newmont has 43,000 employees and contractors in a number of countries.

The company said the mine was a hard rock gold mine and there was no danger of an explosion caused by underground gases.

Linda Willoughby, another mine spokesperson, said mine officials were in telephone contact with the trapped miners throughout their ordeal.

She said that unlike some coal mines that contain volatile methane gas, the hardrock mine faced no threat of an explosion.

Willoughby said the men followed their training after the fire by taking refuge in the underground chambers.

Twenty-nine miners died in November 2010 when methane gases exploded at the South Island's Pike River colliery, in New Zealand's worst mining disaster for almost a century.

Source: Agencies