* TSX ends down 0.24 percent at 10,515.32
* Materials group drops 1.18 percent
* Six-day rally spurs profit-taking (Adds details, official closing numbers, quotes)
TORONTO, July 21 (Reuters) - Toronto's main stock index finished lower on Tuesday as investors pocketed some profits after six straight days of gains and a weaker gold price weighed on the mining-heavy materials sector.
The materials group dropped 1.18 percent as gold prices slipped on anti-inflation comments by the U.S. Federal Reserve. [ID:nN21560088] Goldcorp (G.TO) fell 1.14 percent to C$41.55, while Barrick Gold (ABX.TO) ended down 0.53 percent at C$39.19.
The S&P/TSX composite index .GSPTSE closed down 25.39 points, or 0.24 percent, at 10,515.32 after gaining as much as 57 points early in the day. Five of its 10 main groups were lower.
"Probably some profit-taking, because we had a phenomenal rally in that last couple of weeks," said Lex Kerkovius, senior research analyst at McLean & Partners Wealth Management Ltd in Calgary.
"The market is playing a big game of tug-of-war at the moment between how far it should run with a possible recovery, and have we come too far too soon."
The TSX was down more than 1 percent early in the afternoon, but a rebound in oil prices helped lift the energy sector off its lows. The sector ended down 0.43 percent.
Canadian Natural Resources (CNQ.TO) was the biggest heavyweight decliner on the day, falling 4.1 percent to C$62.55. Talisman Energy TLM.TO dropped 1.2 percent to C$16.88, and TransCanada Corp (TRP.TO) shed 1.1 percent to C$31.00.
On the earnings front, Toromont Industries (TIH.TO) said its quarterly profit and revenue dropped from a year earlier, when a one-time gain from investment sales flattered the industrial equipment supplier's results. But earnings for the latest quarter topped analysts' expectations. [ID:nN21223789]
$1=$1.10 Canadian Reporting by John McCrank; editing by Peter Galloway