The move, which will give each UK household a 400 pound discount on their energy bill and more for lowest-income households, marks a change of heart for Prime Minister Boris Johnson's government, which had previously resisted windfall taxes, calling them a deterrent to investment.
It is the second emergency policy intervention to help with rising bills this year.
Facing intense political pressure to provide more support for people coping with what political opponents and campaigners have called a cost-of-living crisis, finance minister Rishi Sunak said energy firms were making extraordinary profits while Britons struggled.
"We will introduce a temporary and targeted energy profits levy but we have built into the new levy a new investment allowance that means companies will have a new and significant incentive to reinvest their profits," Sunak told parliament.
"The more a company invests, the less tax they will pay."
Sunak did not refer to it as a windfall tax. He said it would raise 5 billion pounds ($6.30 billion) in the next 12 months and be phased out as oil and gas prices return to normal. He did not set out how the rest of the package would be funded.
He also said there would be a new Investment Allowance that would nearly double the tax relief available for firms on their investments.
On Tuesday the UK energy regulator said that a cap on gas and electricity bills was set to rise by another 40% in October, cause by a surge in global energy prices.
Other European governments have also ploughed tens of billions of euros into measures to help mitigate energy prices.
Reuters Graphics Reuters Graphics
Shares in Harbour Energy, the biggest UK North Sea oil and gas producer, turned negative after Sunak's announcement but retraced their losses swiftly.
British North Sea focused oil firm EnQuest's shares were down 8.5% at 1448 GMT - their biggest daily drop in over a month and well below an index of European oil and gas firms which was up more than 1%.
British Chancellor of the Exchequer Rishi Sunak delivers a statement at the House of Commons in London, Britain May 26, 2022. UK Parliament/Jessica Taylor/Handout via REUTERS
Shares in oil majors BP and Shell , which are global companies and so less affected by UK policy, touched session lows after the announcement, but recovered and were up more than 1%.
"We have consistently emphasized the importance of a stable environment for long-term investment," a Shell spokesperson said, calling the investment-linked tax relief measure a "critical principle" of the levy.
The package of support was worth 15 billion pounds, Sunak said. A similar support package in February was worth 9 billion pounds and Sunak said the government was overall providing 37 billion pounds to help consumers.
On top of the 400 pound energy bill credit for all households - which replaces an earlier repayable 200 pound grant - the government will provide more targeted support for poorer households than before.
More than 8 million low-income households will receive an extra 650 pound cost-of-living grant, with smaller additional sums for all pensioners and the disabled.
The announcement also comes at a time when Johnson is keen to move the conversation away from a damning report detailing a series of illegal lockdown parties at his Downing Street office.
Labour, which had been campaigning hard for a windfall tax, said the U-turn showed the Conservative government was motivated by politics rather than a desire to help people.
"Labour called for a windfall tax because it is the right thing to do, the Conservatives are doing it because they needed a new headline," said Labour's economic policy chief Rachel Reeves.
Inflation reached a 40-year peak of 9% in April and is projected to rise further, while government forecasts last month showed living standards were set to see their biggest fall since records began in the late 1950s.
"The high inflation we are experiencing now is causing acute distress for people in this country. I know they are worried, I know people are struggling," Sunak said, backing the Bank of England to use interest rates to bring the situation under control.
British government bond futures touched a day's low as Sunak spoke, and underperformed modestly against German and U.S. government debt.
"The extra fiscal support for households revealed by the Chancellor today falls short of fully offsetting the reduction to households’ real incomes from higher utility prices, but it will cushion the blow and support economic activity," said Paul Dales, chief UK economist at consultancy Capital Economics.
"Overall, this support is much, much needed for millions of households. But it won’t relieve all the pain and may mean the Bank of England has to pull the interest rate lever harder to get on top of inflation," he added.
($1 = 0.7942 pounds)