Rising salad and vegetable costs linked to the shortages of last month contributed to the upwards pressure on inflation, alongside higher pub and restaurant alcohol prices, the Office for National Statistics reports.
The rate of inflation has taken a surprise leap, driven by a rising cost of alcoholic drinks in pubs and food - partly a consequence of the recent salad shortage.
The Office for National Statistics (ONS) calculated the consumer prices index (CPI) measure of inflation at 10.4% over the 12 months to February.
That was up from an annual rate of 10.1% the previous month, dashing expectations of an easing that has been seen since the 41-year high of 11.1% in October last year, as the cost of living crisis gathered steam.
At that time, unprecedented energy prices were being swallowed by businesses and households alike amid the war in Ukraine despite financial support from the government.
Since then, wholesale energy costs have gradually eased.
However, it takes time for those to filter down through the economy to goods and services.
Some supply chains are also complicated by related factors such as wider commodity cost shifts and shortages, such as the lack of tomatoes and other veg items that struck in February but has since eased.
ONS chief economist Grant Fitzner said: "Inflation ticked up in February mainly driven by rising alcohol prices in pubs and restaurants following discounting in January.
"Food and non-alcoholic drink prices rose to their highest rate in over 45 years with particular increases for some salad and vegetable items as high energy costs and bad weather across parts of Europe led to shortages and rationing.
"These were partially offset by falls in the cost of motor fuel, where the annual inflation rate has eased for seven consecutive months."
The latest figures come after Chancellor Jeremy Hunt said in last week's budget that the Office for Budget Responsibility had forecast inflation would fall to 2.9% by the end of 2023.
Interest rate hike ahead?
The inflation data will also be closely watched by the Bank of England ahead of its next interest rate decision on Thursday, which had been thought to be finely balanced in advance of the figures.
But financial markets now firmly believe that policymakers will raise Bank rate again though slow the pace of increase - helping the pound make some gains.
A Reuters poll of economists also expects a 0.25 percentage point hike to 4.25% following February's rise of 0.5 percentage points.
Like the European Central Bank last week, the Bank's monetary policy committee is expected to send a clear signal that it is focused fully on inflation and not worried by the effect its rate rises have had on bank balance sheets amid the recent turmoil for shares in the sector.
There had been a popular school of thought, ahead of Wednesday's data, that the Bank would pause for breath after consistently raising rates since December 2021.
That was because core CPI inflation figures, which strip out volatile elements such as energy, had undershot the Bank's most recent forecasts.
Private sector wage growth had done the same.
The latest inflation figures showed core inflation rising to 6.2% from 5.8% in January.
Mr Hunt said of the inflation spike: "Falling inflation isn't inevitable, so we need to stick to our plan to halve it this year.
"We recognise just how tough things are for families across the country, so as we work towards getting inflation under control we will help families with cost of living support worth £3,300 on average per household this year."