The Toronto Stock Exchange's S&P/TSX composite index ended up 46.29 points, or 0.2%, at 21,834.89, after touching its lowest intraday level since March 17 at 21,635.34.

U.S. stock markets also ended higher, with some major technology stocks helping to fuel a late-session rally while investors eyed a potentially more aggressive Federal Reserve and the war in Ukraine.

"The war itself is a very fluid situation and as long as it persists, because it is unpredictable and markets don't like uncertainty, that means volatility," said Shailesh Kshatriya, director, investment strategies at Russell Investments.

Russia appeared to give the most damning assessment so far of its invasion, describing the "tragedy" of mounting troop losses and the economic hit as Ukrainians were evacuated from eastern cities before an anticipated major offensive.

After the close, Canada's Liberal party government released a budget for the current fiscal year that put red-hot real estate markets squarely in their sights.

The heavily-weighted financial services group, which includes mortgage lenders, ended 1.2% lower on Thursday but resource shares climbed.

The energy sector advanced 1.9%, while the materials group, which includes precious and base metals miners and fertilizer companies, added 1.8%. Gold rose 0.3% to about $1,931 per ounce.

(Reporting by Fergal Smith; Editing by David Gregorio)

By Fergal Smith