* TSX up 58.21 points, or 0.37 percent, to 15,876.21
* Consumer staples the only declining sector on the index
TORONTO, Oct 20 (Reuters) - Canada's main stock index was broadly higher on Friday, touching its strongest level in nearly eight months, as rail companies, banks and miners led gains.
At 10:38 a.m. ET (1438 GMT), the Toronto Stock Exchange's S&P/TSX composite index rose 58.21 points, or 0.37 percent, to 15,876.21. It reached as high as 15,879.34, the highest level since Feb. 23.
Consumer staples, home to grocers and other food producers, was the only declining group among the index's 10 key sectors, slipping 0.2 percent.
The retreat in consumer staples stocks come as retail sales data for August showed an unexpected fall, led by a 2.5 percent drop at food and beverage stores.
Financial stocks, which make up about a third of the index's weight and can drive direction even when individual stock moves are modest, gained 0.5 percent. Canada's four largest banks were among the top 10 most influential advancing stocks, with most making gains under 0.6 percent.
Canadian Pacific Railway extended its gains this week after reporting better than expected third-quarter profit late on Tuesday, and was up another 2.0 percent to C$225.35. Canadian National Railway advanced 0.7 percent to C$103.38. The overall industrials sector rose 0.8 percent.
The materials group, which includes mining and other resource firms, added 0.8 percent as nickel prices hit a six-week high and copper prices remained above $7,000 a tonne.
Teck Resources Ltd rallied 3.5 percent to C$28.76.
New Gold Inc jumped 5 percent to C$4.685 after Canaccord Genuity raised its rating and target price.
On the down side, Klondex Mines Ltd fell 8.9 percent to C$4.01 after the company reported third quarter production results.
DHX Media Ltd plunged 11.3 percent to C$4.
Advancing issues outnumbered declining ones on the TSX by 159 to 83, for a 1.92-to-1 ratio on the upside.
The index was posting 15 new 52-week highs and 5 new lows. (Reporting by Solarina Ho; Editing by Meredith Mazzilli)