Spanish inflation hit a 37-year high in March over soaring energy costs following Russia's Ukraine invasion, official data showed Wednesday, amid a wave of social unrest over spiralling prices that has spawned protests, strikes and production stoppages.

The rate jumped from 7.6 percent in February to 9.8 percent in March, its highest level since May 1985, according to a preliminary estimate from national statistics institute INE.

"It is a bad figure which affects our economy, especially more vulnerable groups," Socialist Prime Minister Pedro Sanchez told parliament.

Like the rest of Europe, Spain has been struggling since last year with soaring energy prices, with households and businesses struggling to pay electricity bills.

Since Russia invaded Ukraine on February 24, food and oil prices have spiked, and Spain's transport and farm sectors have staged noisy protests to demand help with crippling gasoline prices.

Self-employed truckers have since March 14 been on strike, and have blocked roads to protest rising fuel prices, causing sporadic shortages of perishable foodstuffs such as eggs and dairy products.

Sanchez said 73 percent of the price increases were due to the disruptions to the energy and agriculture markets caused by Russian President Vladimir Putin's war in Ukraine.

"Putin's ammunition does not reach us but the impact of the war does," he added.

The statistics office said the hike in inflation in March in the eurozone's fourth-largest economy was "due to generalised increases in most of its components".

"These included increases in electricity prices, in fuels and oil prices, and in food and non-alcoholic beverages prices, which were higher this month than in March 2021," it added in a statement.

Spanish truck drivers and farmers have held protests and strikes over soaring fuel prices
Spanish truck drivers and farmers have held protests and strikes over soaring fuel prices AFP / Pierre-Philippe MARCOU

Underlying inflation, which does not include energy or food products, was up 3.4 percent, its highest increase since September 2008.

Sanchez's government Tuesday approved plans to offer 16 billion euros ($17.5 billion) in direct aid and loans for companies and households hit by the impact of Russia's invasion of Ukraine.

The measures, which will remain in place until June 30, include a discount of 20 cents per litre of fuel, with the government paying 15 cents and fuel providers the rest.

It also includes a 362-million-euro aid package for the agriculture and farming sector, and 68 million euros for the fishing and aquaculture industries.

For households, over the next three months, rent increases will be limited to a maximum of two percent.

Spain, together with Portugal, will also send a proposal in the coming days to the European Union to cap gas prices, on the back of a special authorisation announced late last week by Brussels authorising the two countries to intervene in power markets.

The government hopes that the combination of economic aid and finding a way to decouple gas prices from electricity costs will help defuse internal tensions.

"We are convinced that the national response plan and especially the agreement reached in Brussels to set a gas reference price... will allow us... to bend the curve (of inflation) and stabilise the evolution of the cost of living," Sanchez said.

Inflation was already elevated across the eurozone before the outbreak of the Ukraine conflict, sitting at 5.8 percent in February -- significantly above the European Central Bank's two-percent target.