Increases in the cost of food and non-alcoholic beverages were the largest contributor in pushing UK inflation to its highest level since September 2013, ONS figures reveal.

The consumer price index (CPI) for February shows prices rose 2.3% compared with a year ago, with the Bank of England’s inflation target 2%.

Food prices fell between February and March in the previous six years but in 2017 they rose by 0.6%.

The upward effect came from a wide range of food items with only fruit providing a small downward contribution.

The largest upward effects came from margarine, low-fat spread and crisps with prices for these items rising between February and March 2017 but falling between the same two months a year earlier.

Fish prices rose after Icelandic fisherman were on strike in February over pay and conditions.

The ONS said a shortage of lettuce because of bad weather in southern Europe did not lead to an overall increase in vegetable prices because it was offset by falls in the prices of other vegetables.

Prices of spirits, particularly whisky, and beer, principally lager, rose this year but fell a year ago, which may have been influenced by the timing of price collection in relation to the introduction of duty changes.

Recreation and cultural activities also became more expensive, which may be partly because of the weaker pound, with the category including foreign holidays and imported televisions.

Transport costs were also a factor in rising UK inflation, increasing 6.6% over the past 12 months, due to the value of the pound falling, making oil, which is generally priced in dollars, more expensive.

The main downward effect on inflation came from air fares, which was due to the timing of Easter.

The ONS introduced a new measure of inflation on Tuesday, known as CPIH, which includes housing costs. This also increased 2.3%, while the retail price index showed annual growth of 3.2%.