The rate of Consumer Prices Index (CPI) inflation in the UK matched its record high in September, rising to 5.2% from 4.5% the month before.
An increase in energy costs was behind a large proportion of the rise.
The 5.2% rate is the highest CPI measure since September 2008, and it has never been higher since the CPI measure was introduced in 1997.
The Retail Prices Index (RPI) - which includes mortgage interest payments - rose to 5.6% from 5.2%.
The latest RPI measure is the highest annual rate since June 1991.
The Office for National Statistics, which released the data, said in a statement: "By far the largest upward pressure to the change in CPI... came from increases in gas and electricity charges.
"There were also large upward pressures from air transport and communication services."
Bills for gas and electricity have risen 9.9% in the past month, and are up 18.3% on the year.
Transport has risen 12.8% on the year, and food was 6% higher than 12 months ago.
September's CPI measure is way ahead of the Bank of England's target rate of 2%. However, Bank governor Mervyn King still expects inflation to begin falling next year, once factors such as January's VAT rise drop out of the equation.
But the rise in the cost of living highlights the risk of the Bank's latest move to revive the economy through further quantitative easing, which could help to stoke inflation.
September's CPI is key because it will be used to set the amount by which the state pension and Jobseekers' Allowance will rise next April.
It will be the first time that benefits have increased with CPI instead of the RPI.
Other rates set by the September inflation figures include allowances and indexation for income tax, national insurance, inheritance tax, capital gains tax, disability and maternity benefits, income support and tax credits.
With pensions and benefits rising by 5.2%, it will put further pressure on the chancellor, who is battling to reduce the budget deficit.
But it will provide much-needed relief to claimants struggling to cope with the rising prices of food and fuel.
The Bank of England had already predicted that inflation would top 5% this year as a result of higher utility bills, but it expects price rises to slow in 2012 and 2013.
Despite the higher-than-expected rise in CPI last month, many economists agree with the Bank of England that inflation may soon start to fall.
"The September figure should represent a peak in the rate of inflation," said Chris Williamson, chief economist at financial information company Markit.
Year-on-year increases in petrol prices and VAT will flatten out between now and January, and commodity prices have eased, he said.
Howard Archer, chief UK economist at consultants IHS Global Insight, said: "Consumer price inflation could very well be down near to the Bank of England's target level of 2% by the end of 2012, and it could very well dip below this level in 2013.
"Much will obviously depend on oil price developments," he added.
Jonathan Loynes, chief European economist at Capital Economics, called the CPI figure a "nasty surprise".
But he also agreed that inflation was "either at or close to a peak" and should soon start to fall back.