The annual pace of inflation picked up in May as the consumer price index rose 2.4% compared with a year ago, its largest increase since October last year, Statistics Canada said Wednesday.

The move compared with a 2.0% increase in April and was the fourth straight month of rising year-over-year increases. Economists had expected an increase of 2.1% for May, according to Thomson Reuters Eikon.

Broad-based gains helped boost prices in all eight of major components of the index compared with a year ago.

Food prices rose 3.5% as fresh vegetable prices climbed 16.7%, the largest year-over-year increase since February 2016.

Transportation prices gained 3.1% as the cost of air transportation added 8.9% and the cost of passenger vehicles rose 4.2%. Passenger vehicle insurance premiums rose 8.1%.

However, drivers paid 3.7% less for gasoline compared with a year ago.

Excluding gasoline, the consumer price index increased 2.7% compared with a year ago, compared with a 2.3% increase in April.

The rise in prices put inflation ahead of the Bank of Canada’s ideal target for inflation of 2.0%.

The Bank of Canada, which adjusts its key interest rate to keep inflation in check, has kept rates on hold in recent months after the economic weakness at the end of 2018 and the start of this year.

However, the central bank has been predicting the economy will pick up.

The Statistics Canada report said the average of its three gauges for core inflation, which are considered better measures of underlying price pressures because they omit volatile items like gasoline, rose to 2.07% compared with 1.90% in April.