(Adds analyst comment, updates prices to close)
* TSX ends down 24.50 points, or 0.16 percent, at 15,287.70
* Six of the TSX's 10 main groups move lower
By Alastair Sharp
TORONTO, Dec 12 (Reuters) - Canada's main stock index ended slightly lower on Monday, breaking a six-day rally, as railway stocks weighed and an early jump in energy stocks lost steam.
The Toronto Stock Exchange's S&P/TSX composite index .GSPTSE has gained some 800 points since mid-November as prices for crude oil, a major Canadian export, have jumped.
It settled down 24.50 points, or 0.16 percent, at 15,287.70 after hitting a fresh 19-month high.
"It's a combination of exhaustion and people not wanting to get too far ahead of themselves ahead of the Fed," said Colin Cieszynski, senior market analyst at CMC Markets Canada.
The U.S. Federal Reserve is widely expected to raise interest rates on Wednesday, with attention focused on the likely pace of any further hikes in 2017.
The energy group, which accounts for more than a fifth of the index's weight, rose 0.5 percent. It had surged earlier along with crude prices after OPEC and some of its rivals agreed to jointly reduce output to tackle global oversupply. O/R
Six of the index's 10 main groups finished in negative territory, including a 1.5 percent decline for industrials and a 0.3 percent slip for the heavyweight financials group.
Canadian National Railway Co CNR.TO fell 2.3 percent to C$89.52 and rival Canadian Pacific Railway Ltd CP.TO lost 2.7 percent to C$200.10.
The materials group, which includes precious and base metals miners and fertilizer companies, slipped 0.2 percent. Potash Corp POT.TO fell 2.5 percent to C$25.38 and Agrium Inc AGU.TO lost 2.7 percent to C$140.20.
The two companies plan to merge as the sector struggles with weak prices.
Cenovus Energy Inc CVE.TO , which last week said it would increase its capital spending and resume work on an oil sands project in 2017, gained 1.5 percent to C$20.97.
The Canadian government on Friday reached a deal with eight of the 10 provinces to introduce a landmark national carbon price aimed at helping Canada meet its international climate change obligations.