Mining and energy stocks helped move Canada’s largest stock index higher on Friday, as U.S. markets fell into the red a day after making their biggest gain in two months.

The S&P/TSX composite index was up 63.20 points to 15,998.57. Taseko Mines Ltd. and Baytex Energy Corp. had some of the biggest advances, up more than 5% and 6% respectively at the closing of markets.

“Toronto is up today largely because the U.S. dollar is down, which has the price of gold and oil higher, which broadly affects the Canadian market,” said Norman Levine, managing director of Portfolio Management Corp.

The January crude contract climbed US$1.36 to US$56.71 per barrel while the December gold contract soared US$18.30 to US$1,296.50 an ounce.

Canadian oil stocks were somewhat tempered by news that TransCanada Corp.’s Keystone pipeline leaked an estimated 210,000 gallons of oil onto agricultural land in northeastern South Dakota on Thursday, Levine noted.

While state officials don’t believe the leak polluted any surface water bodies or drinking water systems, the timing of the incident couldn’t be worse. Thursday’s spill comes four days before Nebraska is set to vote on whether TransCanada can go ahead with its XL pipeline, which would take a more direct route than the existing Keystone pipeline. Shares of the energy company were down 59¢, or 0.93%, to $62.54.

South of the border, U.S. stock indices were mostly lower on Friday as technology companies, including Microsoft, lagged the market.

The Dow Jones industrial average fell 100.12 points to 23,358.24. The S&P 500 index edged down 6.79 points to 2,578.85 and the Nasdaq composite index lost 10.50 points at 6,782.79.

“The market has been on a down trend so far this month pretty much, and yesterday was a big rebound day, but you could say it’s just resuming its down trend,” said Levine. “There’s no real fundamental reason other than valuations got ahead of themselves and they’re just trying to normalize here a bit.”

In currency markets, the Canadian dollar was trading at US78.23¢, down 0.23 of a U.S. cent.

Elsewhere in commodities, the December natural gas contract was up US4¢ to US$3.10 per mmBTU and the December copper contract added US2¢ at US$3.07 a pound.