The Bank of England said the UK's inflation jump would be temporary.
British inflation fell to the Bank of England's 2% target last month in an unexpectedly sharp slowdown that economists said was most likely a blip as the reopening of the economy after lockdown drives prices higher.
Economists polled by Reuters had expected Wednesday's official data to show a 2.3% rise in consumer prices in July following a 2.5% rise in June.
Sterling showed little reaction to the figures as investors judged they were unlikely to alter the rising trend for inflation and would not sway Bank of England policymakers much.
Earlier this month the BoE said it expected to tighten monetary policy moderately over the next three years.
July's slowdown in inflation reflected a jump in prices in the same month last year when Britain's economy was emerging from its first coronavirus lockdown.
Prices of clothing and footwear and computers, games and toys also dragged on the rate of price growth last month, the Office for National Statistics said.
"The fall in year-on-year inflation last month masks the strength of inflationary pressures currently within the UK economy," Yael Selfin, chief economist at KPMG UK, said.
Earlier this month the BoE said it expected inflation to jump to 4.0% around the end of the year, which would be a decade high. But the BoE stuck to its view that the acceleration of inflation would prove to be temporary.
"We see inflation falling back to around 2% at the end of next year as production facilities expand, requiring only minimal tightening by the Bank of England in the short term," Selfin said.
As in earlier months, Wednesday's figures showed second-hand cars were a big driver of inflation in July - a phenomenon also seen in the United States.
Global shipping problems, tight supplies of semiconductors and shortages of some goods such as motor vehicles have contributed to rising inflation in many countries.
The ONS data showed signs of continued inflation pressure in prices paid and charged by factories.
Output costs rose in annual terms by the most in nearly 10 years, increasing by 4.9% compared with July last year. Input costs also rose by more than expected, jumping by almost 10%.
(Reporting by Andy BruceEditing by William Schomberg)
Thanks for signing up to Minutehack alerts.
Brilliant editorials heading your way soon.
Okay, Thanks!