The Toronto Stock Exchange sign is seen in Toronto, Ontario, Canada July 6, 2017.
The Toronto Stock Exchange sign is seen in Toronto, Ontario, Canada July 6, 2017. Reuters / CHRIS HELGREN

Canada's main stock index inched higher on Friday, and was on track to gain for a second consecutive week as commodity-linked shares advanced, although an escalating Russia-Ukraine crisis kept sentiment in check.

At 9:55 a.m. ET (14:55 GMT), the Toronto Stock Exchange's S&P/TSX composite index was up 11.39 points, or 0.05%, at 21,261.8, recouping early losses, aided by gains in energy and mining shares.

The heavyweight energy sector climbed 2.3%, as oil prices jumped above $113 a barrel due to fears over disruption to Russian oil exports in the face of Western sanctions offset the prospect of more Iranian supplies. [O/R]

The materials sector, which includes precious and base metals miners and fertilizer companies, added 1.6%, hitting its highest level since early 2012, as gold futures rose 0.1% to $1,935.6 an ounce. [GOL/]

Meanwhile, global equities were down on signs of an escalation in the Russia-Ukraine crisis, with reports of a fire near Ukraine's Zaporizhzhia nuclear power plant, following fighting with Russian forces. [MKTS/GLOB]

"There's a balancing act going on right now. So we have the geopolitical tensions that are creating a risk off environment in the equity market, yet the commodities segment of the market is benefiting," said Philip Petursson, chief investment strategist at IG Wealth Management.

The benchmark index, up 0.9% so far this week, was on track for its second straight weekly gains.

"So while I would say sentiment out there is weak because of the uncertainty. Ironically, the Canadian stock market is a beneficiary to what's been going on," Petursson added.

On the economic front, the value of Canadian building permits fell by 8.8% in January from December, Statistics Canada said. Analysts surveyed by Reuters had expected a gain of 2.0%.