Though the rise in inflation to 2.6 percent from the previous month's 2.4 percent brought an end to a run of declines, many analysts expect the downtrend to resume quickly as the British economy struggles to emerge from recession.
The increase was unexpected, with most analysts predicting another fall to 2.3 percent.
The Office for National Statistics said a 22 percent jump in air fares between June and July and a lower than expected drop in prices for clothing and footwear lay behind the increase.
"The uptick may only be temporary, but persistent high inflation will hurt consumer spending though the squeeze on take-home pay and damages economic recovery hopes," said Chris Williamson, chief economist at financial data company Markit.
The Bank of England is tasked with keeping inflation at around 2 percent. The rate has declined from a peak of 5.2 percent in September. Since then, the British economy has posted three straight quarters of falling output and that's kept a lid on inflation, as have falling energy prices.
The Bank of England's latest inflation forecast, released last week, predicts that inflation could drop below the target next year. That would leave greater scope for the Bank to do more to stimulate
"The near-term outlook for inflation has worsened slightly on the back of the renewed rise in petrol prices and the rise in agricultural prices," said Vicky Redwood, chief U.K. economist at Capital Economics.
For the full year, the Bank said it expects 2012 to be a year of stagnation, with little or no growth in economic output.
The surprise increase in inflation is likely to complicate discussions about whether the Bank should undertake another monetary stimulus.
The Bank has invested 375 billion pounds ($588 billion) so far buying government bonds from financial institutions. The policy, commonly known as quantitative easing, is intended to make banks more amenable to lending to the wider economy and to stimulate demand.
The Bank of England and Britain's Treasury last month announced another growth initiative, the Funding for Lending Scheme, intended to stimulate more bank lending. The Bank is offering to lend Treasury bills to banks for a fee, and the banks in return will provide collateral in the form of loans to households and businesses.
Britain's rail commuters will be particularly dismayed by the increase in the retail prices index—a separate measure of inflation—from 2.8 percent in June to 3.2 percent in July. The July RPI figure sets the base for calculating increases in train fares for 2013, with fares permitted to rise by 3 percentage points more than the RPI at the time.