Keir Starmer has said Britain must seize opportunities for green jobs or risk repeating the mistakes made when coal mines shut down.
The Labour leader said future generations "will never forgive us" for failing to plan for the future as he sought to smooth tensions with the GMB union, which has criticised his plans to block new North Sea oil and gas developments.
After an address to the union's conference in Brighton, Mr Starmer was challenged by a GMB Scotland rep called Tam, who warned banning new North Sea oil and gas drilling would leave communities "decimated".
The union, which represents workers in the energy sector and is one of Labour's biggest backers, has warned the move would be a "huge mistake".
The Labour leader told him: "I know that you and others, working people across the country, are being let down by the Tories and let down by the SNP on this promise about jobs that never materialised.
"I want to be absolutely clear: Oil and gas are going to be part of the mix for decades to come - into the 2050s."
But he said there is "a race on for the next generation of jobs" in renewables and nuclear energy - and Britain needs to be in the mix.
Labour is expected to set out new details of its green energy plans next week.
Mr Starmer said: "What I will never let happen is a repeat of what happened in coal mining, where an industry came to an end and nobody had a plan for the future.
"We're still living with the consequences. We cannot allow that to happen."
Mr Starmer claimed there were hundreds of thousands of jobs up for grabs, and warned "future generations will never forgive us for repeating the mistake that was made when the coal mines were closed down."
He rejected calls for a moratorium on offshore wind until jobs can can be ensure on shore.
Mr Starmer said: "I don't actually think a moratorium is the way forward. But I do think that we've got to use vehicles like GB Energy, that will be a publicly-owned vehicle, where we determine where the jobs are to ensure that they are here in the UK, and that we have incentives in contracts, to look at supply chains and where the jobs are for the supply chains."
In his first in-person address to the GMB Congress as leader, Mr Starmer won applause for union-friendly promises such as fair pay for carers and stronger employment protections.
He vowed to implement the party's workers' rights blueprint in the first 100 days of a Labour Government, which includes a ban on zero hours contracts and strengthen workplace laws.
The Labour leader also won applause for urging Amazon to recognise trade unions - a key battle for the GMB.
In his speech, Mr Starmer said he accepted Labour "did drift away from its fundamental cause of serving working people".
But he added: "Everything I do, all the changes we are making, are in the service of this goal.
"They are grounded in a new project which understands that the Labour Party can only restore hope in Britain, if we once again become the natural home for working people."
He said working people were paying the price of the Tories being in Government - from cuts to economic stagnation.
His speech comes after a public clash with GMB General Secretary Gary Smith, who said “it would be a huge mistake to put all the nation’s eggs in one energy basket" by banning new oil and gas developments.
Earlier, Shadow Work and Pensions Secretary Jonathan Ashworth denied there was a "chasm" between Labour and its union backers.
"Labour is not proposing to close down these gas and oil fields, they have decades to run,” he told the BBC.
“What we want to do is transition to the green energies of the future."
The frontbencher said switching to renewables would help rebuild the economy, create jobs and slash energy bills.
The UK's top climate adviser Lord Deben also backed Labour's commitment, saying: "It is the right thing to do."
He told the Guardian: “I’m sorry this is not a common view to all parties."
* Follow Mirror Politics on Snapchat, Tiktok, Twitter and Facebook