Refining New Zealand has struck a deal with Mobil Oil on the move to turn the Marsden Point oil refinery to an import-only facility.
Mobil was the last of the big three oil companies which process crude at the refinery to agree commercial terms with Refining NZ on the conversion.
BP and Z Energy reached agreement with the refinery on similar in-principle terms earlier in the year.
"This provides added certainty regarding the final terms for a potential import terminal, as well as the expected timing for a final investment decision and ultimate conversion," Refining NZ chief executive Naomi James said.
"We remain focused on concluding our customer negotiations as soon as possible and on putting in place plans for a well-managed transition and working with stakeholders to provide the support needed by our workforce through this change."
Refining NZ shareholders earlier this month overwhelmingly supported the plan to cease processing crude oil and become a terminal for imported refined fuel products.
The company's board is due to make a final decision on the transition plan by the end of September, with the move to import only operations expected by the middle of next year.