Shares in Meridian Energy rallied after international mining giant Rio Tinto said it would delay the closure of the Tiwai Point aluminium smelter in Southland until 2024.
Rio was to have shut the plant in August this year.
Shares in Meridian, the sharemarket's biggest company by market capitalisation and Tiwai Point's main supplier - initially rallied by 25c to $8.14 on the news.
Contact Energy, which was part of the re-negotiation, was flat at $9.95.
Harbour Asset Management portfolio manager Shane Solly said the market reaction could have been greater had it not been for intense exchange-traded fund buying of shares in the two stocks, which drove them sharply higher, early this month.
"It is positive and it's good to have some transparency and some clarity.
"The move gives the sector lots of time to make the structural changes that need to happen to the network in order to get power to the north when Tiwai eventually closes."
Analysts said Rio's decision may have been swayed by aluminium prices, which lifted by 4.1 per cent in December and rose by nearly 14 per cent in 2020.
Tiwai Point is easily New Zealand's biggest consumer, taking about 13 per cent of the country's power supply.
Meridian and Contact, which have extensive hydropower generating assets in the south of the South Island, stood to lose the most from the plant's closure.
Meridian - 51 per cent owned by the government - said the company had worked hard to provide solutions to the smelter that were acceptable to its shareholders.
"We're pleased that Rio Tinto has accepted this offer, which will now provide certainty for the Southland community," Meridian chief executive Neal Barclay said.
The smelter's operator - NZAS - is a joint venture between Rio Tinto (79.36 per cent) and Sumitomo Chemical Company Limited (20.64 per cent).
Contact Energy chief executive Mike Fuge said the deal would add certainty.
"Today's announcement of the deal between Meridian and NZAS ensures sustainable smelter operations in the medium term and allows time to plan for an ultimate exit of New Zealand's largest energy user."
As part of the arrangement, Contact has agreed to supply Meridian Energy with a portion of the electricity required to power the NZAS smelter at Tiwai Point.
Contact will provide an average of 100 megawatts of baseload electricity through until the end of 2024, assuming the smelter requires 572 megawatts of electricity.
He said Contact was continuing to advance its Tauhara geothermal project in readiness for an investment decision.
Contact is 14 per cent owned by US passive investment giant, BlackRock.