(Adds analyst quotes and details throughout; updates prices)
* TSX ends down 15.63 points, or 0.1 percent, at 15,082.21
* Seven of the index's 10 main groups end lower
* Energy group falls 1.2 percent
* Materials group climbs 1.7 percent
TORONTO, Aug 16 (Reuters) - Canada's main stock index reversed course to end lower on Wednesday as a drop in oil prices weighed on energy shares, offsetting gains for the materials group as base and precious metal prices climbed.
Losses for the Toronto Stock Exchange's S&P/TSX composite index, which had spent much of the day in positive territory, came as the United States laid down a tough line for modernizing the North American Free Trade Agreement.
The index closed down 15.63 points, or 0.1 percent, at 15,082.21. It was the second straight day of modest losses for the index.
"It is a bit of a split day for Canada, where we have the resource sectors going in opposite directions," said Colin Cieszynski, senior market analyst at CMC Markets Canada.
Suncor Energy Inc was the biggest drag on the TSX, ending down 1.9 percent at C$39.94. The overall energy group, which accounts for one-fifth of the TSX's weight, fell 1.2 percent as oil prices weakened.
U.S. crude oil futures settled 1.6 percent lower at $46.78 a barrel even though U.S. crude stockpiles declined by the most in a year, as data suggesting domestic production was edging higher stoked worries about the global crude glut.
In contrast, zinc prices surged to their highest in almost a decade while aluminum and copper hit their highest since 2014 as rises across most industrial metals triggered pre-set buy orders and a wave of speculative buying.
Gold prices also climbed, boosted by a weaker U.S. dollar after U.S. President Donald Trump announced the disbanding of two high-profile business advisory councils, and minutes from July's meeting of the Federal Open Markets Committee showed that policymakers had grown increasingly worried about weak U.S. inflation readings.
"The street (financial markets) took the minutes as being dovish," Cieszynski said.
Base-metal miner Teck Resources Ltd ended up 5.1 percent at C$29.76, while First Quantum Minerals Ltd rose 9.7 percent to C$13.41 and HudBay Minerals Inc jumped 11.8 percent to C$10.26.
The materials group, which includes precious and base metals miners and fertilizer companies, added 1.7 percent.
Manulife Financial Corp was also among the most influential gainers, rising 1.3 percent to C$25.46. But the overall financials group dipped 0.1 percent, while industrials ended down 0.8 percent as railroad stocks lost ground.
Seven of the index's 10 main groups ended lower. (Additional reporting by Solarina Ho; Editing by Chizu Nomiyama and Lisa Shumaker)