LONDON - Britain announced a 25% windfall tax on oil and gas producers' profits on Thursday, alongside a 15 billion pound ($18.9 billion) package of support for households struggling to meet soaring energy bills.

The announcement marks a change of heart for Prime Minister Boris Johnson's government which had previously resisted windfall taxes and called them a deterrent to investment.

Facing intense political pressure to provide more support for billpayers 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.

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.

He also said there would be a new Investment Allowance that would nearly double the tax relief available for firms on their investments.

Financial markets had already largely anticipated the announcement but shares in Harbour Energy, the biggest UK North Sea oil and gas producer, turned negative after Sunak's announcement, trading down 0.7% and underperformaing a broader index of European oil and gas firms. British North Sea focused oil firm EnQuest's shares fell 2%.

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 around 1% by 1146 GMT.

The package of support was worth 15 billion pounds and would support around a third of British households, Sunak said.

On Tuesday the UK energy regulator said that a cap on gas and electricity bills was set to rise by another 40% in October.

(Reporting by Muvija M Andy Bruce and Kylie MacLellan, writing by William James, editing by Hugh Lawson, Frank Jack Daniel, Michael Holden and Susan Fenton)