The annual pace of inflation cooled in February as it posted its largest deceleration since April 2020.

Statistics Canada said Tuesday its consumer price index in February was up 5.2 per cent compared with a year earlier.

The reading compared with an annual inflation rate of 5.9 per cent in January and was the lowest annual inflation rate since January 2022 when it was 5.1 per cent.

Statistics Canada noted that the decline was due to a steep monthly increase in prices in February 2022 when the global economy was significantly affected by the Russian invasion of Ukraine.

Despite the overall cooling, grocery prices remained elevated and outpaced overall inflation.

Prices for food purchased from stores in February were up 10.6 per cent compared with a year ago, the seventh consecutive month of double-digit increases.

Meanwhile, energy prices were down 0.6 per cent year over year as gasoline prices fell 4.7 per cent compared with a year ago when prices began to rise due to the Russian invasion of Ukraine. It was the first yearly decline for gasoline prices since January 2021.

Excluding food and energy, Statistics Canada said prices in February were up 4.8 per cent compared with a year ago, following a 4.9 per cent year-over-year gain in January.

The annual inflation rate peaked at 8.1 per cent in June 2022, but has been declining.

The Bank of Canada, which is working to bring overall inflation back to its target of two per cent, left its key interest rate target unchanged earlier this month at 4.5 per cent.

It was the first time the central bank kept its key policy rate on hold since it began raising it last year in an effort to cool rising prices.

The average of the three core measures of inflation that are closely watched by the Bank of Canada eased to 5.37 per cent in February compared with 5.57 per cent in January.

This report by The Canadian Press was first published March 21, 2023.