(Bloomberg) -- Canada’s rate of inflation accelerated by more than expected for the second straight month, but gains driven largely by higher gasoline prices likely won’t faze the Bank of Canada.

The consumer price index rose 4% in August from a year ago, the quickest pace since April, after a 3.3% increase in July, Statistics Canada reported Tuesday in Ottawa. That’s faster than the median estimate of 3.8% in a Bloomberg survey of economists. On a monthly basis, the index rose 0.4%, double expectations.

Two key yearly inflation measures that filter out components with extreme price fluctuations and are tracked closely by the central bank — the so-called trim and median core rates — also increased, averaging 4% from an upwardly revised 3.75% a month earlier, exceeding the 3.7% pace expected by economists.

A three-month moving average of the measures that Governor Tiff Macklem has flagged as key to his team’s thinking rose by a full percentage point to an annualized pace of 4.49%, according to Bloomberg calculations.

Traders in overnight swaps upped bets the central bank will resume tightening, with odds of another rate hike in October rising to about a coin flip, from about a third before the release. Bonds were pummeled, with the Canada two-year yield jumping to 4.891% as of 10:06 a.m. Ottawa time — the highest since 2001.

Tuesday’s numbers once again highlight a challenge in the current phase of the inflation battle, where the decline toward the 2% target is expected to be more uncertain. The bank forecast price gains would remain near 3% for the next year. But with the economy showing signs of softening, policymakers may be willing to wait for disinflationary forces to translate into a slower rate of inflation in the coming months.

Macklem alluded to the acceleration in a speech and news conference earlier this month after holding rates steady at 5%, saying that higher global oil prices would “increase headline inflation in the near term.” Energy prices had been the biggest contributor to slowing inflation since the peak last year, accounting for two-thirds of the slowdown.

In the US, the jump in gasoline prices also led to an acceleration in core inflation for the first time in six months.

This is the first of two inflation reports before the Bank of Canada’s next rate decision on Oct. 25, when the majority of economists in a Bloomberg survey expect Macklem and his officials to hold again.

“The central bank is unlikely to change course based on one reading,” Royce Mendes, head of macro strategy at Desjardins, said in a report to investors. “There continue to be signs that the economy is stagnating even though the lagged impacts of monetary policy have yet to make their way through the system. As a result, expect policymakers to remain hesitant about raising rates any further this cycle even if they continue to talk tough.”

Over the past several weeks in Canada, evidence has mounted that interest rate increases are slowing down the economy. The labor market added fewer jobs than the gains in employment from immigration-driven population growth in August, while preliminary data suggested gross domestic product was flat in July, after a surprise contraction in the second quarter.

In a separate report Tuesday, Statistics Canada said the job vacancy rate — or the number of vacant positions as a proportion of total labor demand — fell to 4.4% in the second quarter, the fourth consecutive quarterly decline.

The acceleration in headline inflation was largely the result of higher year-over-year prices for gasoline in August compared with July. Excluding gasoline, the index held steady at 4.1% in July and August.

Gasoline prices rose 0.8% on the year in August, the first increase since January, after falling 12.9% in July. On a monthly basis, gasoline prices rose 4.6%, mainly the result of higher crude prices following production cuts from major oil-producing countries.

Shelter prices were up 6% in August compared with a year earlier, after increasing 5.1% in July. Faster growth in shelter prices was led by the rent index, which rose 6.5% after a 5.5% gain in July, as a higher interest-rate environment raised barriers to homeownership.

The mortgage interest cost index also contributed to the acceleration in shelter prices, rising at 30.9% in August compared with 30.6% in July.

Price growth for groceries slowed in August. On a year-over-year basis, prices for food purchased from stores rose 6.9% in August compared with 8.5% in July. On a monthly basis, prices for groceries were down 0.4% last month.

In August, services inflation held steady at 4.3%.

Regionally, prices rose at a faster year-over-year pace in August compared with July in every province.

Energy prices increased the most in Alberta, jumping 13.3% in August from a year ago, with gasoline, natural and electricity prices contributing to the acceleration amid high demand.

Rent prices accelerated in eight provinces, with Newfoundland and Labrador, Alberta, Nova Scotia and Manitoba seeing the fastest price growth.

--With assistance from Erik Hertzberg.

(Updates with more details, market reaction and economist comments throughout.)

©2023 Bloomberg L.P.