While this will appeal to long-suffering investors, it may attract the attention of the new prime minister Rishi Sunakin a bid to plug a £40 billion hole in the public finances.

Banks argue that the windfall tax will only limit what they can lend to companies and small customers. Critics say add profit are only due to rising rates and that banks have to pay.

The bank has set aside £381 million to pay off expected bad debts, but says it has not yet seen a high level of customer problems.

CEO CS Venkatakrishnan said, “We stand ready to support clients and customers facing an uncertain economic environment and high cost pressures. Whether helping retail clients manage their finances or corporate clients navigate volatile markets, we will continue to focus on meeting their needs.”

Santander and Standard Chartered also made a strong comeback today.

Markets.com’s Neil Wilson said: “Barclays beat expectations thanks to sharp revenue growth in its trading business. FICC (Fixed Income, Currencies and Commodities) trading revenues were up 93%, but were still hit by a US trading error of almost £1bn. The stock hasn’t seen much of a lift as a result – the usual concern is that trading returns are one-offs, but investors aren’t sure about the returns either. While the report card is good, there is significant economic uncertainty and concern about a surprise tax on banks.”

Barclays has just been fined £50m by the Financial Conduct Authority for “reckless behaviour” in a 2008 Qatar fundraising deal. It did not adequately communicate to the market the nature of the deal, which prevented the bank from falling into the hands of the UK state at a time when rivals needed help to survive.

RBC Brewin Dolphin’s John Moore said: “Looking ahead, the uncertain economic environment is likely to hold back some of Barclays’ markets, particularly in its credit card and investment banking divisions, with the outlook for corporate action – such as capital raising – more difficult.”

Barclays shares fell 2p to 148p. This year they decreased by 25%.