The index has rebounded from a nearly-four week low on Monday as oil rallied but its recovery has held short of the six-month high of 13,972.62 reached at the end of April.

"There seems to be a lot of uncertainty about gold and oil pricing," said Subodh Kumar, chief investment strategist at Subodh Kumar & Associates.

Investors are grappling with the impact of lower oil prices on oil company operations and how soon production will come back in Alberta, he added.

Workers for one of the largest oil sands companies affected by a massive wildfire in northern Canada will begin returning to the shuttered facilities on Thursday, a union official said.

Encana Corp (>> Encana Corporation) surged 13.4 percent to C$8.97, while the overall energy group gained 1 percent.

U.S. crude oil futures settled at $46.23 a barrel, up 3.52 percent, after the U.S. government unexpectedly said crude inventories fell the first time since March.

The materials group, which includes precious and base metals miners and fertilizer companies, added 1.1 percent.

Barrick Gold Corp (>> Barrick Gold Corp.) rose 2.2 percent to C$23.71, while First Quantum Minerals Ltd (>> First Quantum Minerals Limited) was up 8.2 percent at C$9.23.

Spot gold was up 0.8 percent at $1,276.68 an ounce as the U.S. dollar and global shares fell.

The Toronto Stock Exchange's S&P/TSX composite index <.GSPTSE> closed up 13.02 points, or 0.09 percent, at 13,788.21. It touched its highest since May 3 of 13,829.73.

Five of the index's 10 main groups ended higher.

Financials rose 0.2 percent, including a 0.8 percent advance in the shares of Sun Life Financial Inc (>> Sun Life Financial Inc) to C$43.14. The company reported a 13-percent increase in underlying net income in the first quarter, exceeding estimates.

InnVest Real Estate Investment (>> InnVest Real Estate Investment Trust) said that it has entered into an agreement to be bought by Bluesky Hotels and Resorts. Its shares jumped more than 29 percent to C$7.07.

Brookfield Asset Management Inc (>> Brookfield Asset Management Inc) fell 1.5 percent to C$43.56. The company has offered to buy a division of state-controlled Petroleo Brasileiro SA's natural gas pipeline unit.

The shares of Kinross Gold Corp (>> Kinross Gold Corporation) fell 4.8 percent to C$6.81 after the company reported on Tuesday lower-than-expected quarterly revenue.

Industrials lost 0.7 percent as railway stocks dragged, while consumer discretionary stocks fell 1.4 percent.

(Reporting by Fergal Smith; Editing by James Dalgleish and Nick Zieminski)

By Fergal Smith