OTTAWA (Reuters) - Canada's annual inflation rate edged up to 1.9 percent in March from 1.5 percent in February as the downward pressure from gasoline prices lessened, easing market expectations that the Bank of Canada would cut interest rates by year end.

The result was in line with analyst forecasts, though it remained just below the Bank of Canada's 2.0 percent target for a third successive month, Statistics Canada data showed on Wednesday. Excluding energy prices, the overall rate would have been 2.2 percent.

In a separate release, Statscan said Canada's trade deficit narrowed slightly to C$2.9 billion ($2.18 billion) in February, declining for the second straight month from a record high of C$4.8 billion in December 2018.

The Canadian dollar strengthened to a four-week high at 1.3275 to the U.S. dollar after the data, while money markets were factoring in a roughly 15 percent chance of a rate cut by year end, down from more than 25 percent ahead of the data.

"I think the most important element here is the upswing we saw in core inflation," said Doug Porter, chief economist at BMO Capital Markets. Two out of three of the Bank of Canada's measures of core inflation edged up into the 2.0 percent range.

"They'll (the Bank of Canada) certainly take note of it. I don't think this is enough to really sway them yet," he added.

The Bank of Canada has put interest rate hikes on hold amid a slowing domestic and global economy, following five increases since July 2017. It is expected to stay on the sidelines at its next rate decision on April 24.

Prices increased year-over-year in all eight major components of Canada's consumer price index, Statscan said, with Canadians paying more in mortgage interest costs and more for fresh vegetables.

The decline in energy prices, meanwhile, slowed in March, with gasoline prices down 4.4 percent compared with an 11.9 percent fall in February. Overall, energy prices were down 1.2 percent compared with 5.7 percent in February.

"It still looks like a lot of the softness is coming from energy sector and that'll probably be transitory, but there are still concerns about global economic backdrop," said Nathan Janzen, senior economist at Royal Bank of Canada.

CPI common, which the Bank of Canada says is the best gauge of the economy's underperformance, stayed at 1.8 percent. CPI median, which shows the median inflation rate across CPI components, rose to 2.0 percent while CPI trim, which excludes upside and downside outliers, was up to 2.1 percent.