An Air Force C-130 Hercules plane has landed safely following a mid-air emergency.
Seven fire crews were standing by at the Whenuapai airbase in Auckland, where the plane touched down just after 11:30am.
The C-130 comes in to land (Michael Morrah / Newshub.)
"A Royal New Zealand Air Force C-130 returned to RNZAF Base Auckland at Whenuapai after developing issues with its electrical generator while en route to Nausori," the New Zealand Defence Force said in a statement.
"Smoke entered the cabin through the aircraft's aircon system while the crew was attempting to isolate the problem with the faulty generator."
There were also reports the plane, with 15 people on board, lost cabin pressure, and was flying at low altitude and dumping fuel.
The Defence Force says the C-130 can operate safely without its generator.
"Nevertheless, it is standard procedure to turn back to the nearest suitable landing airfield following situations such as this. As a precautionary measure, emergency services were placed on standby at the airport, but were not required."
Conditions in the area were difficult, with strong winds and rain.
The Air Force has five C-130 Hercules aircraft, all dating back to the 1960s. According to the Air Force website, they all underwent "a modernisation and structural improvement programme to ensure that they last until 2015".