UK consumer price inflation remained at 3% in January, the same level as in December.
The rate, as reported by the Office for National Statistics (ONS), is close to November’s six-year high of 3.1%.
Most economists were expecting a small fall in the CPI to 2.9%.
Last week, the Bank of England indicated interest rates might rise sooner than expected when it said it wanted to get inflation closer to 2% within two years rather than three.
Investors have been pricing in a good chance that rates would rise in May, with a second rise later this year, probably in November.
Interest rates are currently at 0.5%. If the Bank raised rates in line with market expectations, they would reach 1% by the end of this year.
The ONS said that although petrol prices had risen by less than this time last year, the cost of entry to attractions such as zoos and gardens fell more slowly.
It said, however, that after rising strongly since the middle of 2016, food price inflation now appeared to be slowing.
ONS senior statistician James Tucker said: “Factory goods price inflation continued to slow, with food prices falling in January. The growth in the cost of raw materials also slowed, with the prices of some imported materials falling.”
Inflation was given a steep boost by the UK’s vote in 2016 to leave the European Union.
It prompted a fall in the pound, making imported goods more expensive.
The ONS reports a series of inflation numbers.
It said the Retail Prices Index (RPI), which is used to calculate payments on government bonds, student loans and other commercial contracts, edged down to 4% from December’s six-year high of 4.1%.
Its own preferred measure, which includes housing costs, remained at 2.7% in January, also unchanged from December.