The Tomago Aluminium smelter in the NSW Hunter region faced closure in 2028 due to forecasts of higher energy prices.
The federal and NSW governments have agreed to split the cost of the bailout, with unions hailing the deal as a "win for the working class".
The bailout comes after the majority owner of the smelter, mining giant Rio Tinto, reported a profit surge to $6.9 billion for the first half of 2026.
Tomago Aluminium annually produces up to 590,000 tonnes of aluminium, a metal crucial to the construction, manufacturing and retail sectors.
Prime Minister Anthony Albanese said aluminium was an essential product for the nation.
"The idea that we sit and allow this facility to just disappear would have had consequences," he told reporters in Tomago on Thursday.
"We cannot afford to be at the end of supply chains. We need to be a country that makes things, and there is nowhere better in Australia that has a history of making things than the Newcastle and Hunter regions."
The smelter is the largest electricity user in the nation and consumes about 10 per cent of power supplies in NSW.
The Australian Energy Regulator has forecast energy contract prices to double by 2029.
Electricity accounts for more than 40 per cent of the smelter's operating costs and Tomago Aluminium warned it would not remain commercially viable if prices rise.
Tomago Aluminium has agreed to invest a further $1.1 billion to decarbonise and upgrade its facilities to better adapt to fluctuations in renewable energy supply and demand.
It's the latest in a string of bailouts from state and federal governments for metal-processing infrastructure.
In recent years, the federal government has promised billions of dollars in propping up facilities including the Whyalla steelworks in SA, along with the Mount Isa copper smelter and the Boyne aluminium smelter, both in Queensland.
The union movement welcomed the latest bailout, saying workers at the smelter can finally feel confident about the future after months of uncertainty.
''This is a win for working-class people in the Hunter that is a testament to the tireless advocacy of our members on the job," Australian Manufacturing Workers' Union NSW and ACT state secretary Brad Pidgeon said.
Premier Chris Minns said the smelter was important for sovereign capability.
"We have got a proper plan for this region that involves good, well-paid jobs deep into the future, and we aren't going to be the kind of government either at the state or the federal level that turns its back on these kind of jobs," he said.
"If we're serious and with a straight face are making the claim that Australia is a place that builds things, then Tomago has to remain open."
Opposition Leader Angus Taylor was critical of the federal government, and said the federal bailout was an indication its energy policies weren't working.
"This is a $2.5 billion admission of failure on energy policy in this country," he told reporters in Canberra.
"The reason they are having to do this is because electricity prices are too high."
Nationals Leader Matt Canavan said while it was good the jobs had been saved at the smelter, bailouts were not the solution.
"We're still going to produce the same amount of aluminium, no more output, but it's going to cost us a hell of a lot more to do it," he said.
Smelter chief executive Jerome Dozol warned in 2025 the facility would have to close without government intervention on future energy prices from renewable and fossil fuel sources.
Following news of the bailout, Mr Dozol praised the result.
"This is a great outcome for our workers, who have lived through a great deal of uncertainty over the last two years," he said.