The ONS put June’s inflation figure partly down to a 42% year-on-year increase in petrol prices.
Last month, average petrol prices stood at 184p a litre, up 18.1p since May alone. Diesel, meanwhile, increased by 12.7p to 192.4p a litre.
Food and non-alcoholic drinks were up 9.8% in the year to June, the highest rate since March 2009.
Grant Fitzner, chief economist at the Office for National Statistics (ONS), commented: “Annual inflation again rose to stand at its highest rate for over 40 years.”
“The increase was driven by rising fuel and food prices, these were only slightly offset by falling second-hand car prices.”
“The cost of both raw materials and goods leaving factories continued to rise, driven by higher metal and food prices respectively.”
“These increases saw raw materials post their highest annual increase on record, with manufactured goods at a 45-year high.”