(Adds strategist quotes, details on BlackBerry and consumer staples group, updates prices)
* TSX ended down 7.79 points, or 0.05 percent, at 14,524.61
* Five of the TSX's 10 main groups ended lower
By Fergal Smith
TORONTO, July 19 (Reuters) - Canada's main stock index dipped slightly on Tuesday as oil prices fell and resource stocks retreated, offsetting gains by consumer and technology stocks.
The index has rallied more than 25 percent since January, helped by a partial recovery in oil prices. Last week it reached an 11-month high of 14,558.12.
"I think it really does come down to oil," said Philip Petursson, chief investment strategist at Manulife Investments, who expects the recent pullback in oil prices to prove temporary and the Toronto Stock Exchange's S&P/TSX composite index index to rise to between 14,750 and 15,000 by the end of the year.
Oil prices slipped as a rallying U.S. dollar and a global fuel glut offset forecasts of a ninth straight weekly drop in U.S. crude stockpiles. U.S. crude oil futures settled 59 cents lower at $44.65 a barrel.
Suncor Energy Inc fell 1.1 percent to C$35.80, while the overall energy group declined 0.7 percent.
The materials group, which includes precious and base metals miners and fertilizer companies, dropped 0.8 percent even as gold edged higher and some base metals reached multi-month highs.
First Quantum Minerals Ltd fell 4.1 percent to C$9.98, and Teck Resources Ltd declined 6.0 percent to C$17.47. Fertilizer company Agrium Inc fell nearly 2 percent to C$122.50.
The S&P/TSX composite index closed down 7.79 points, or 0.05 percent, at 14,524.61. Five of the index's 10 main groups ended in negative territory.
Uncertainty related to the U.S. election has become more of a headwind for the market as the Republican convention takes place this week, said Petursson.
"Its more noise than any kind of fundamental impact and therefore it might swing the markets, but I don't think it will have a lasting effect," he added.
BlackBerry Ltd sought to bolster its security credentials with a string of small deals, but analysts said the jury was still out on the success of its turnaround and push into software. The company's shares fell 0.3 percent to C$8.68.
On the positive side, Open Text Corp rose 3.2 percent to C$80.19 after two analysts raised their price targets for the software company. The technology sector, which accounts for less than 3 percent of the index's weight, rose 1.1 percent.
The consumer staples group advanced 0.8 percent, led by a 1 percent gain for Alimentation Couche-Tard Inc. (Additional reporting by Alastair Sharp; Editing by James Dalgleish and Steve Orlofsky)