OTTAWA (Reuters) - Canada's annual inflation rate slowed to a three-year low of 2.7% in April, matching expectations, and core measures continued to ease, data showed on Tuesday, likely boosting chances of a June interest rate cut.

Analysts polled by Reuters had forecast inflation to cool to 2.7% from 2.9% in March. Month on month, the consumer price index rose 0.5% in April, also less than a forecast of 0.6% gain.

Food prices, services and durable goods led the deceleration in headline inflation, Statistics Canada said. The cooling was moderated by gasoline prices, excluding which, annual inflation slowed to 2.5% from 2.8% in March.

The annual inflation rate is now closer to the Bank of Canada's 2% target than in April, when Governor Tiff Macklem said the bank's six-member council was looking for sustained cooling in inflation before lowering borrowing costs.

The central bank's preferred measures of core inflation also eased. CPI-median slowed for the fourth straight month to 2.6% from 2.9% in March, while CPI-trim decreased to 2.9% from 3.2%.

Tuesday's report is among the last major data to be released before the Bank of Canada's next rate announcement on June 5. Before inflation data, money markets saw a roughly 60% chance of the bank keeping its policy rate on hold at a 23-year high of 5%.

At 2.7% - slowest since March 2021 - inflation is running slightly cooler than the Bank of Canada's forecast for it stay around 3% in the first half of 2024, before cooling down to 2.2% by the end of the year. Inflation has been above 2% since March 2021 and touched a four-decade high of 8.1% in June 2022, and the bank expects it to cool down to 2% in 2025.

In April, an acceleration in gasoline prices added upward pressure to inflation, as higher costs associated with switching to summer blends, higher oil prices due to supply concerns and an increase in the federal carbon levy all contributed to the increase in prices, Statscan said.

Grocery price gains slowed to 1.4% annualized, led by slower growth in meat prices.

Excluding volatile food and energy, prices rose 2.7% compared with a 2.9% rise in March.

Services prices rose 4.2% on an annual basis, while goods prices increases 1%.

(Reporting by Ismail Shakil in Ottawa; Editing by Dale Smith)