Gains for the index came as U.S. markets were closed for the Independence Day holiday. It left the index more than 23 percent above its three-year low in January and within reach of a nearly 10-month high reached in June at 14,450.91.

"Anything that we can produce in Canada and sell outside of Canada should be viewed positively," said Sid Mokhtari, director, institutional equity research, at CIBC World Markets.

He expects "durability in the commodities complex" to help Canada's stock market outperform Wall Street this year.

Silver Wheaton Corp (>> Silver Wheaton Corp.) rallied 6.8 percent to C$32.47 and Barrick Gold Corp (>> Barrick Gold Corp.) climbed 4.1 percent to C$28.70, while the overall materials group, which includes precious and base metals miners and fertilizer companies, added 4.3 percent.

Gold rose as political uncertainty following Britain's vote to leave the European Union supported prices after a burst of short-covering activity in China had pushed them back toward last week's two-year high.

Silver also benefited from a surge of buying in China that at one point took it up more than 7 percent, breaking above $21 an ounce for the first time in two years.

Spot gold rose 0.6 percent, while silver was up 2.8 percent.

The Toronto Stock Exchange's S&P/TSX composite index <.GSPTSE> closed up 194.33 points, or 1.38 percent, at 14,258.87. It touched its highest since June 8 at 14,291.62.

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

Royal Bank of Canada (>> Royal Bank of Canada) rose 1.1 percent to C$77.19 and Brookfield Asset Management Inc (>> Brookfield Asset Management Inc) was up 1.9 percent at C$43.56. The overall financials group advanced 0.7 percent.

Industrials climbed 1.5 percent, including gains for railway stocks, while energy stocks also advanced 1.5 percent.

U.S. crude oil futures fell 0.5 percent to $48.76 a barrel as slowing demand in Asia weighed.

Canadian business sentiment remained subdued in the second quarter, as the drag of cheaper oil prices and modest domestic demand canceled out the boost from foreign demand, the Bank of Canada said.

The pace of growth in Canada's manufacturing sector stepped back in June as measures of output, new business and employment all fell, data showed, the latest sign Canada's economy is struggling to gain momentum.

(Reporting by Fergal Smith; Editing by Andrea Ricci and Peter Cooney)

By Fergal Smith