Spain will implement temporary taxes on power companies and banks that should rake in €7 billion in 2023-2024 to help Spaniards cope with soaring inflation, the government said.

Prime Minister Pedro Sanchez told parliament that annual revenue in 2023 and 2024 from a tax on extraordinary profits of power utilities made this year and next should reach €2 billion,.

The surprise tax on financial institutions would also bring in €1.5 billion a year.

Sanchez said the government would impose the tax on "big banks as they were already starting to benefit from (expected) interest rate rises".

The spokesperson for the Spanish banking association AEB said the "European Central Bank's possible rise in interest rates did not necessarily ensure an improvement in banks' profitability, nor did it translate into extraordinary profits, but rather responded to the rise in inflation and may lead to less economic activity."

The government would not provide any details on the planned rates or how the levies would work, saying only they would apply to companies with a turnover of at least €1 billion.

Martinez added that the sector had not been consulted or informed, despite maintaining a permanent dialogue with the government.

Analysts said banks were already under pressure from recession fears and the possibility that any rate hikes might not be as significant as expected.

"The impact on Spanish banks has been immediate because this measure was not expected and it has come as a cold shower," said Nuria Alvarez, an analyst at Madrid-based brokerage Renta 4.

The levy would put further pressure on lenders' ability to generate profits at a time when their provisions are also likely to rise, she said, adding that banks with largely domestic operations were more affected than those with more diversified businesses such as BBVA or Santander.

Shares in utilities Iberdrola, Endesa and Naturgy fell 0.2%, 0.6% and 0.7%, respectively. The government had already said it was going to tax power firms.

Sanchez said inflation, caused to a large extent by Russia's invasion of Ukraine, was the biggest challenge for Spain, likening it to "a serious illness of our economy that impoverishes everyone, especially the most vulnerable groups".

Sanchez also announced €100 a month in complementary scholarships for students older than 16 years who already receive scholarships, and free multiple-trip tickets for suburban and medium-distance trains between September and the end of December.