* TSX falls 7.49 points, or 0.05 percent, to 13,956.19
* Eight of the index's 10 main groups finish lower
* Energy group up 1.34 percent, materials up 1.1 percent (Updates with comments, details)
By Solarina Ho
TORONTO, Feb 23 (Reuters) - Toronto's main stock index closed little changed on Wednesday as the violent revolt in Libya helped bolster energy and gold shares but dragged on overall market sentiment.
Most global stock markets fell as investors moved away from risky assets into safe havens such as gold and bonds as U.S. crude oil prices hit a 28-month high of $100 a barrel in reaction to the Libyan crisis, spurring inflation fears. [GOL/] [O/R] Output in Libya, an OPEC producer, fell due to the turmoil there. [MKTS/GLOB]
Among Toronto-listed oil producers rising were Suncor Energy (SU.TO), up 2.26 percent at C$46.08, Encana Corp (ECA.TO), up 3.47 percent to C$31.64, and Nexen Inc NXY.TO, which advanced 3.81 percent to C$25.58. The index's energy group climbed 1.34 percent.
The materials group, home to mining firms, rose 1.1 percent as gold miners gained on the back of bullion prices that jumped 1 percent.
Barrick Gold (ABX.TO) firmed 1.7 percent to C$51.92. Kinross Gold (K.TO) gained 2.28 percent to C$15.70, while Agnico Eagle (AEM.TO) jumped 2.9 percent C$70.66.
Gold prices rose to their highest level in more than seven weeks as the soaring crude prices fueled worries that economic recovery might stall.
"The issues are certainly getting people to reevaluate the risks that they have in their portfolios right now," said Bruce Latimer, a trader at Dundee Securities.
"And let's face it, the market has had a decent run, so people might be using this as an opportunity to take some profits and move into some cash and look for some bargains."
The Toronto Stock Exchange's S&P/TSX composite index .GSPTSE closed 7.49 points, or 0.05 percent, lower at 13,956.19 after spending a bulk of the session in positive territory.
"Generally speaking, I think people just have to focus on the longer term and what's driving the actual longer-term opportunities for these companies," said Brian Pow, vice president and research and equity analyst at Acumen Capital Partners. "Ignore the short term."
Eight of the index's 10 main groups were in the red. The heavyweight financial group was a lead decliner, falling 1.12 percent.
Bank of Nova Scotia (BNS.TO) fell 1.61 percent to C$58.50, while Toronto-Dominion Bank (TD.TO) declined 1.16 percent to C$78.50.
Tim Hortons THI.TO rose 0.77 percent to C$41.77, after it reported strong quarterly sales growth, particularly in the U.S. market, and raised its dividend. [ID:nN22269270]
($1=$0.99 Canadian) (Reporting by Solarina Ho; editing by Peter Galloway)