Overall food prices climbed 15.4 percent from a year earlier, the biggest increase since the statistical series began in January 1994, according to the National Statistics Institute.
Food prices were up 2.3 percent over the previous month.
The cost of fresh vegetables jumped by 25.7 percent on an annual basis, eggs were up 25.5 percent, milk increased 25 percent and the price of grains rose 22.1 percent.
Food prices have risen globally since Russia’s invasion of Ukraine in February reduced grain shipments from one of the world’s top suppliers.
An extreme drought and consecutive heatwaves in Spain this year have also slashed agricultural output in the country, a leading producer of fruit and vegetables in the European Union.
The overall inflation rate slowed to 7.3 percent in October, down from 8.9 percent in September and moving further away from a 38 year high of 10.8 percent in July.
This was due to a drop in the price of electricity, which fell 22.5 percent over the previous month, and “to a lesser extent” a 6.4 percent fall in the cost of gas, the statistics institute said.
The surging cost of food especially hits low-income consumers who spend a bigger chunk of their household budgets on groceries.
Food banks have reported a surge in demand this year as the price of groceries has risen.