Hundreds of thousands of Transpower customers lost power today when backup measures failed to kick in while the company simulated a "catastrophic power failure" on its inter-island link.
Ten per cent of the company's North Island customers had their power cut for about two hours from 11am.
Outages were reported in areas across Auckland, Thames, Napier, Tokoroa, Lower Hutt and Masterton.
The outage resulted in disruptions to students sitting NCEA exams, retailers were unable to make electronic transactions, and 100,000 broadband customers lost service.
In Auckland, ambulances were parked outside stations to avoid them being trapped behind electric doors.
"Upon notification of a power outage, St John moved ambulances outside station electronic gates and roller doors to prevent vehicles becoming locked in, which could compromise response times," St John Auckland district operations manager Derek Liefting said.
The outage to between 300,000 and 400,000 customers was Transpower's "worst nightmare" its chief executive Patrick Strange said.
Transpower was testing whether backup options would kick in should there be a failure on its main line - however, the equipment did not react as it should have.
"We really apologise for the impact on customers."
It was a "software logic" rather than an equipment issue, he said.
All previous lower-range tests of the equipment had not failed.
"So we've just got to work out why it's passed all its tests to date and why it failed when we increased the transfer like this."
Telecom said about 100,000 customers lost their home broadband service during the outage.
However, the 111 service and mobile network were not affected, a spokeswoman said.
A Vodafone spokesman said the power outage caused loss of mains power to over 100 cell sites and many fixed-line roadside cabinets in areas across the North Island, however, service continued to run on battery backup.
The only impact to service was a brief outage to a cell site in Taupo, and a longer outage to a single cell site in Lower Hutt which was restored soon after by a Vodafone technician.
Shoppers were plunged into darkness at Westfield St Lukes shopping centre, a spokeswoman said.
It was running emergency lighting off its generators, and mall management were "out there assisting shoppers".
Lights also went out for Kelston Boys' High School pupils sitting a NCEA Level 2 English exam.
Acting principal Robert Solomona said light became "very minimal" and caused them to stop the exam.
Staff contacted the New Zealand Qualifications Authority (NZQA) who advised them to give the students an option of moving to an area with more space, and also to extend the two-hour examination time by 30 minutes.
"In the end we moved them into the foyer where there is some natural light in order for them to complete it to the best of their ability," Mr Solomona said.
"I'm sure that no one was too disadvantaged by it."
Lower Hutt's Naenae College also lost power for a few hours while students were sitting the NCEA Level 2 English exam.
Deputy principal Mark Robinson said fortunately, there was enough light for students to carry on uninterrupted.
A computer presentation during a junior school assembly was also disrupted , however they just "carried on old-school style", Mr Robinson said.
The NZQA advised that if any students had exams disrupted by the power outages their school will let them know what to do.
What the tweets said:
* @KiwiMichael: "@Vectorltd Interesting that the power was restored before the outage notice was sent."
* @nzpost: "Pls be advised some of our branches are without power currently in the North Island due to a power outage ^K"
* @richardhills777: "Power outages across NZ. I thought John Key said this would only happen if Labour won & made power cheaper? So do he take responsibility now."
* @AklTransport: "Power outages around AKL mean some traffic lights not working. Plse take care, more info to follow."
* @NZTAWgtn: "Several traffic lights in the Hutt Valley have been affected by a power cut. Take care on the roads & follow give way rules. #DriveSafe ^MA."