The annual inflation rate accelerated last month for the first time since January for a result that supported the view consumer prices are set to rise with the improving economy.

Statistics Canada’s latest inflation report, released Friday, found that higher gasoline prices in July helped the year-over-year rate pick up its pace to 1.2%. This was an increase from June’s reading of 1%, which was inflation’s lowest mark in almost two years.

While still below the Bank of Canada’s ideal inflation target of 2%, the July number supported the bank’s expectations that the softness was mostly temporary.

Analysts said Friday’s inflation report reinforced widely held expectations that the central bank will hike its benchmark interest rate again this fall.

“Earlier this year, there was a discrepancy — inflation data with the strong economy,” said Matthieu Arseneau, a National Bank senior economist.

“But there’s always a lag. Inflation reacts with a couple of quarters of lag, so we’re seeing an improvement on that front.”

Citing the healthier-than-expected economy, the central bank raised its trendsetting rate last month for the first time in nearly seven years, to 0.75% from 0.5%.

Before the July policy decision, some experts had suggested the central bank might hold off boosting its rate because of weak inflation since the start of 2017. The annual rate peaked in January at 2.1%.

Statistics Canada’s report Friday also found that two of the central bank’s three measures for core inflation, which omit volatile items like gas, saw slight increases in July for the second straight month. The other one was unchanged.

Those underlying readings, watched closely by the inflation-targeting bank, were 1.3%, 1.4% and 1.7%.

“One month is hardly a trend, but the modest increases in the Bank of Canada’s core measures provides some hope that inflation may have turned a corner,” TD senior economist Brian DePratto wrote in a research note to clients.

“Canadian inflation may still be modest, but is showing some signs of moving in the ‘right’ direction vis-a-vis the Bank of Canada’s 2% cent inflation target.”

The higher price at the pumps, up 4.6% in July compared to a year earlier, was among the biggest contributors behind the increase, Statistics Canada said.

Upward pressure also came from year-over-year price increases of 9.7% for natural gas, 8.5% for traveller accommodation and 4.1% for homeowner’s replacement costs.

Among the downward pressures: the cost of electricity. The report said it saw its biggest drop in 14 years due in large part to legislated rebates in Ontario.

Lower prices for video equipment, furniture and internet access also weighed on the overall inflation number.

Looking ahead, BMO chief economist Doug Porter said he’s expecting gas prices to show another increase in the August inflation report. He also said he no longer expects food prices to pull down inflation and noted that Ontario has no more electricity cuts on the way.

“Combined with a firmer economic backdrop, these signs suggest that the lows for both headline and core inflation have likely been put in, and both will grind higher in the year ahead,” Porter wrote in a research note.