OTTAWA  - Canada's annual inflation rate eased more than expected to 3.1% in October and core inflation measures edged down to their lowest levels in about two years, data showed on Tuesday, likely closing the door to further rate hikes.

Analysts polled by Reuters had forecast inflation to cool to 3.2% from 3.8% in September. Month-over-month, Statistics Canada said the consumer price index was up 0.1%, matching forecasts. The Bank of Canada (BoC) targets 2% annual inflation.

The deceleration in headline inflation could fortify investor bets that the BoC will start lowering its key policy rate from a 22-year high of 5.00% in the first half of 2024.

The BoC's core measures of underlying inflation edged lower, with CPI-median dropping to 3.6% and CPI-trim to 3.5%, the lowest since December 2021 and November 2021, respectively.

"This is exactly the type of progress that central bank officials have been waiting to see," said Royce Mendes, head of macro strategy at Desjardins Group. "If the door wasn't already shut to additional rate hikes, it now should be."

The central bank has held rates steady in its last two meetings, but says it remains prepared to hike again if needed. The bank projects inflation to hover around 3.5% until mid-2024, before trickling down to its 2% target in late 2025.

The Canadian dollar was trading 0.2% higher at 1.37 to the greenback, or 72.99 U.S. cents, after the data.

Dragging the annual inflation rate in October was a 7.8% drop in gasoline prices, which benefited from comparison with a price surge in October 2022. Grocery prices also cooled down to its slowest pace since November 2021.

Excluding volatile food and energy, prices rose 3.4% compared with a 3.2% rise in September.

While goods inflation slowed to 1.6% in October, services prices accelerated to 4.6%, the largest increase since May.

The BoC's next rate decision is on Dec. 6, after the release of third-quarter GDP data, which is expected to show that the Canadian economy slipped into a shallow recession.

"In conjunction with data showing slack building within the labor market and growth data suggesting the economy is in a shallow recession, today's constructive inflation report has completely undermined the BoC's hawkish bias," said Simon Harvey, head of FX Analysis for Monex Europe and Canada.

Later on Tuesday, Finance Minister Chrystia Freeland will deliver a mid-year fiscal update that is expected to show widening deficits and weak economic growth, and include targeted spending to boost housing supply.

With a stalling economy, high interest rates and inflation still elevated, Prime Minister Justin Trudeau's Liberal government is under pressure to fight an affordability crisis in the country without stoking inflationary pressures.

(Reporting by Ismail Shakil and Steve Scherer in Ottawa, additional reporting by Dale Smith in Ottawa, Fergal Smith and Divya Rajagopal in Toronto, and Siddarth S; Editing by Chizu Nomiyama)