The Toronto Stock Exchange's S&P/TSX composite index ended up 19.68 points, or 0.1%, at 20,590.98, after declining in the five previous trading days.

The index closed 2.3% above its session low, but sentiment remained fragile amid fears that Russia will invade Ukraine and ahead of interest rate announcements on Wednesday by the Bank of Canada and the Federal Reserve.

"A lot of the direction of the markets for the rest of the week is likely going to be determined by what the Fed says or doesn't say tomorrow," said Angelo Kourkafas, investment strategist at Edward Jones.

Investors expect the Fed to signal an interest rate increase in March, while the Bank of Canada could hike for the first time since October 2018.

"We have sentiment that is reaching extremes in terms of investor anxiety and caution," Kourkafas said. "Typically, that sets the stage for a rebound. Especially as we think that the fundamental backdrop remains supportive."

The energy group rose 3.6%, helped by higher oil prices. U.S. crude oil futures settled up 2.8% at $85.60 a barrel on concerns supplies could become tight due to Ukraine-Russia tensions, threats to infrastructure in the United Arab Emirates and struggles by OPEC+ to hit its targeted monthly output increase.

The materials group added 0.6% as gold benefited from its safe-haven status to reach its highest level in more than two months.

Heavily-weighted financials ended 0.3% higher.

Weighing on the market was renewed pressure on technology. The sector gave back its previous day's gains, closing down 3%.

(Reporting by Fergal Smith; Additional reporting by Ambar Warrick; Editing by Bernard Orr)

By Fergal Smith