A black box has been recovered from a locomotive that fell into Picton Harbour which may shed light on how it ended up in the sea.
The 50-tonne vehicle pushing a wagon and two containers fell into the approximately 10-metre deep water on Wednesday.
The incident is being investigated.
KiwiRail chief operating officer Todd Moyle said a local salvage team used airbags to float the locomotive and tow it 400 metres to get it in position for two 350-tonnes cranes to haul it out.
"It was effectively like a ballet really, picking the locomotive up and then threading it between the two cranes - they did a spectacular job.
"The locomotive has a black box on it like an aeroplane, so we were able to recover that last night and that's now on its way to the manufacturer to download the data off it and that will help us with the investigation."
Moyle said it would be a few days before they know what happened.
The wagon was retrieved on Thursday.
About 20 litres of diesel has leaked out of the locomotive but it has been contained.
Moyle said the bridge that links the Aratere ferry and the dock was damaged in the incident.
He said it would be checked today in the hopes the Aratere can resume sailing either later today or tomorrow.
"This has been a complex recovery job," Moyle said.
"I want to thank Port Marlborough, the Harbour Master, our contractors and the KiwiRail team who have kept the protection of the marine environment and the safety of everyone on site paramount during this difficult task.
"It's good to see the locomotive back on dry land, where it belongs."
Moyle said while he did not yet know how much the recovery operation had cost "it will be expensive".
Moyle said the locomotive will be taken to a workshop for examination.