The fault which cut power to the Interislander ferry has been identified as a leak in the cooling system.
The ferry Kaitaki lost power about 5pm on Saturday night in rough conditions and drifted dangerously close to Red Rocks on Wellington's south coast.
The crew managed to restore power and the ship limped into the harbour, docking about 9pm - seven hours after leaving Picton.
Interislander executive general manager Walter Rushbrook said the fault was in the process of being fixed.
"The root cause was a fault in the ship's engine cooling system," he said.
"As is common in ships, there is one water cooling system which is connected to all four of the main ship engines and also to the engines that run the generators for electricity."
A leak in a connection caused a loss of pressure, and sensors automatically shut down the engines to protect them from overheating.
The connection had now been repaired and all other components of the cooling system have been checked and tested, Rushbrook said.
"The ship will not return to service until Lloyds Register Class Society - an independent third party - has inspected the ship and issued an assurance report to Interislander and Maritime New Zealand."
They hoped to restart sailings on Kaitaki later this week. The ship would be undertaking sea trials and carry only freight for a while before returning to normal service.
When bookings become available, Interislander would be posting updates on its Facebook page.
Its contact centre was experiencing high call volumes and long wait times so, where possible, customers should use the website.
Earlier, Wellington harbourmaster Grant Nalder said by the time the Kaitaki put down its anchors on Saturday evening, it was 0.6 nautical miles from water shallow enough to ground it.
"They issued a mayday call," he said. "You do a mayday if there's risk to life, so the captain felt it was serious."
A timeline released by Maritime New Zealand showed the ship first reported engine problems just before 5pm.
It dropped its anchors and a mayday call was made at 5.05pm.
It was just over a nautical mile - about 2km - off Sinclair Head, better known as Red Rocks.
There was a south-westerly wind of 30 to 40 knots, and swells up to a metre high.
Nalder said that was nothing the ferry hadn't seen before. "That's rough, it's not extreme, and it's not at the vessel's operating limits."
Passengers on board told RNZ the same - it was rough, but not terrible.
The weather did, however, push the ship closer to danger, Nalder said.
"If it had been a northerly instead of a southerly they would have just been quietly drifting out to sea, which may be a bit upsetting for the passengers, but absolutely safe for the ship until they get it going.
"It was just because they were getting carried towards the shore that this became an issue."
Maritime New Zealand incident controller Paul Craven said police, ambulance and the defence force were assembled, and five rescue helicopters put on standby.
Six boats were sent out for support - fellow Interislander ferry the Aratere, police boat Lady Elizabeth, two harbour tugs, a pilot boat and a fishing vessel.
Investigations had been launched by Interislander itself, as well as by the Transport Accident Investigation Commission (TAIC), and Maritime New Zealand.
Transport Minister Michael Wood told Nine to Noon on Monday that, at 30 years old, the Interislander ferries were requiring more maintenance.
"The Interislander ferry fleet is coming towards the end of its life, and that's well known," he said. "That has meant there has been a decline in the reliability of the vessels.
"We've had extensive maintenance work under way on all the vessels to keep them as safe and reliable as possible, so it's concerning that we have had this incident."
Help was on the way. Building consent had recently been granted for the new terminal at Kaiwharawhara, designed to accommodate two new, larger, hybrid-electric ferries.
However, with these not expected to arrive before 2025, the Kaiarahi, Kaitaki, and Aratere will have to hold on for a little bit longer.