Fears the Tiwai Point aluminium smelter might close have receded for now but a new agreement only guarantees it will remain open until 2018.
In a deal, Meridian Energy has won an increase in the price it gets for the electricity it supplies to the company.
But it said the price was still less than the smelter would have paid if it had relied on the rest of the market to supply a big chunk of of its power.
Under previous agreements the smelter had the right to do this.
Meridian will now supply most of the smelter's 572 megawatts of power, but fuel 80 megawatts from Contact Energy into that mix.
It said the agreement committed Meridian to cover the full 572 megawatts currently used at the smelter at more competitive rates for the smelter than would have applied if it had chosen to rely on other suppliers.
The smelter meanwhile reiterated that its power was still too dear and was pinning its hopes on a cut to its transmission costs.
This matter is being debated by the Electricity Authority.
Long-running tension
The company running the firm has long complained about the costs of doing business at the plant, chiefly the price it pays for its electricity and the cost of transmitting that electricity to its factory.
Two years ago the smelter faced closure, but the operating company, New Zealand Aluminium Smelters, stayed on, after winning a $30 million bailout from the Government and getting an undisclosed cut in the price it pays for its electricity from Meridian Energy.
Fears that the plant might close down stem from highly publicised complaints from the smelter that it pays too much for its power.
In a statement, New Zealand Aluminium Smelters argued it paid one of the highest costs of electricity anywhere in the world outside China.
It added its transmission costs were also much too high, and had risen by $25 million in seven years with no increase in the level of service.
On the other hand, the smelter already gets electricity at a big discount compared with other users - estimated at between one quarter and one third.
Critics say that and the Government's $30 million grant are little more than corporate welfare, and that the company has complained about costs often in the past and has never followed through with threats to pull out of New Zealand.
Complicating the picture is vocal support for the smelter in Southland.
The company hires 800 full-time workers and contractors and estimates it directly and indirectly pays for the livelihood of 3000 people.
It adds it makes up 10 percent of Southland's GDP, and local officials in the area have vowed to fight any closure.
But there is another complication.
New Zealand already has as much electricity as it needs and closure of the smelter would release one seventh of New Zealand's entire electricity capacity onto the market.
That would flood supply and depress prices for all electricity producing companies and probably gas companies as well.
Closure would also deprive Meridian Energy of a customer which takes one third of its total output - something the company is unlikely to want to happen.
The smelter is 80 percent owned by a subsidiary of Rio Tinto. That share was put up for sale in 2011 and taken off the market two years later.
However Rio still regards it as a non-core asset and is understood to be still interested in selling it if the right buyer comes along.
Hanging over the company's head is a low price for aluminium, which has been slipping for at least five years.
Despite that, the company managed to turn around two years of losses to make a modest profit last year.
Mayor welcomes decision
Invercargill mayor Tim Shadbolt has welcomed the decision to keep Tiwai Point open.
Mr Shadbolt said it was a huge relief for all the businesses in the region which depend on it.
He said the possible future closure was still a concern, but aluminium had good prospects - for example, in the car industry where there are big fuel savings to be made by switching to aluminium bodies.
Listen to more