* Main index up 54.07 pts, or 0.43 pct, at 12,519.51
* Materials, gold miners drive rise
* Financials down 0.5 pct
* Europe deal doubts weigh on markets
By Jon Cook
TORONTO, Oct 28 (Reuters) - Canadian stocks closed stronger on Friday after touching a near two-month high, as gains in the safe-haven gold sector offset the broader drag from fading optimism about Europe's deal to solve its debt crisis.
Toronto stocks had rallied more than 2 percent on Thursday on the initial euphoria about a deal being reached. But a weaker sale of Italian bonds that followed showed investor confidence in the agreement was shaky. [MKTS/GLOB]
"They (Europe) kicked the can down the road. But it's a very short road and it looks like we're going to be revisiting a lot of the problems so gold stocks have been benefiting," said John Ing, president of Maison Placements Canada.
"Precious metals have been and remain the place to hide."
The materials sector and gold miners were the biggest drivers. With gold on track for its best weekly gain in two months, the Canadian gold mining sector rose 2.3 percent. [GOL/]
Barrick Gold (ABX.TO) led the sector and broader market higher, jumping 3.9 percent to C$50.50. Goldcorp Inc (G.TO) was also up 3.8 percent to C$49.68.
The Toronto Stock Exchange's S&P/TSX composite index .GSPTSE ended up 54.07 points, or 0.4 percent, to 12,519.51. It touched a session high of 12,541.84, its strongest level since Sept. 9.
Other areas retreated from the previous day's gains, as half of the TSX's 10 main sectors were down. Financials were the largest drag, falling 0.5 percent after jumping nearly 3 percent the day before.
The biggest weights on the sector were Manulife Financial Corp (MFC.TO), down 1.87 percent to C$13.68, and Sun Life Financial (SLF.TO), off 2.3 percent to C$25.22.
In other news, shares of base metal miner Inmet IMN.TO jumped more than 7 percent. The company said talks with parties interested in buying a stake in its Cobre Panama copper project in Central America are continuing and that there has been no dip in interest despite current global economic concerns. [ID:nN1E79R0NU]
Mosaid Technologies MSD.TO, an Ottawa-based wireless firm that recently acquired about 2,000 patents from Nokia and Microsoft, rose 5.8 percent to C$45.95 on news it will be bought by U.S. private equity firm Sterling Partners for C$590 million ($594 million). [ID:nN1E79Q294] (Editing by Jeffrey Hodgson)