The Government has reached a deal with the American company L3 Communications to finish an upgrade of the RNZAF's C-130 Hercules aircraft.
The upgrade ran into trouble when sub-contractor Safe Air, a subsidiary of Air New Zealand, pulled out of the contract to do much of the structural work on the aircraft.
Work on two Hercules had almost been completed under that contract.
Under a revised deal announced on Tuesday, the Government itself will become the sub-contractor to L3 Communications.
Work on the three remaining Hercules will largely be carried out at Woodbourne, near Blenheim, at facilities currently occupied by Safe Air.
Defence Minister Wayne Mapp says Safe Air's workforce will do the work, which is expected to begin early next year.