The UK government says it has reached a "new and improved deal" with Tata Steel, confirming it will give a £500m grant to the company.
The money will go towards the cost of building a greener electric furnace in Port Talbot, and matches the amount agreed by the previous Conservative government.
The Conservatives say Labour had raised “false hopes” about saving jobs but Business Secretary Jonathan Reynolds said workers now have more protection, with assurances from Tata on future jobs and investment.
It comes as thousands of workers are being made redundant by Tata Steel as it closes both of its blast furnaces in Port Talbot.
As part of the deal Tata Steel has agreed to look at future investment opportunities, thought to include the potential for wind turbines to be made in south Wales at a new plate mill.
The Community and GMB trade unions called the deal "not something to celebrate" but one that was "better than the devastating plan announced by Tata and the Tories back in September 2023".
Business and Trade Secretary Jonathan Reynolds said the agreement gives "hope for the future of steelmaking in south Wales".
"We know that a cleaner, greener future for UK steelmaking is vital to the industry’s long-term economic stability," he said.
"The road ahead is not without its challenges but our steel strategy will set forth a positive vision for the future of the industry, backed by our manifesto commitment to £3bn of government investment."
The government says it will sent out its steel strategy in the spring.
Under the deal Tata will offer staff at risk of compulsory redundancy a "comprehensive training programme" providing "recognised qualifications in sought-after skills". Tata also says it is offering its best ever redundancy package to workers losing their job.
The firm expects at least 500 jobs to be created to construct the electric arc furnace.
The deal was agreed on Tuesday in a meeting between the prime minister, Business and Trade Secretary Jonathan Reynolds, Chancellor Rachel Reeves, and Tata chair Natarajan Chandrasekaran and confirmed by Reynolds in the House of Commons on Wednesday.
Welsh Secretary Jo Stevens said it "secures the immediate future of Port Talbot steelworks, lays the foundations for future investment, and enhances protections for the workforce across south Wales, all without further cost to the taxpayer".
“As well as negotiating a better deal than the previous government, we have already released millions of pounds of funding from the Transition Board to support businesses and workers in Port Talbot and across south Wales.
"While this is a very difficult time for Tata workers, their families and the community, this government is determined to support workers and businesses in our Welsh steel industry, whatever happens."
'Tragic missed opportunity'
In a joint statement, Community general secretary Roy Rickhuss and Gary Smith, general secretary of the GMB, said: "Back in November last year, Community and GMB published the Multi-Union Plan, an alternative approach that would have safeguarded Port Talbot steelmaking and secured a just transition for the workforce.
"Regretfully we couldn’t secure the support of all stakeholders for our credible alternative decarbonisation strategy, and ultimately the company rejected the basis of our proposals, representing a tragic missed opportunity.
"Under the circumstances representatives of all the steel unions resolved to negotiate the best possible deal, and then put it to a ballot of the membership. This is what we have done, and voting is underway."
The Conservatives accused Labour of raising false hope that a better deal was on offer, and said the government had finally realised the Tories had done their best to save steelmaking.