Canadian stocks touched their highest level in two months on Tuesday as mining and energy issues rose on healthy import data out of China, which boosted investor optimism for the global economy.

The heavyweight materials sector led the early gains, rising more than 2 percent, as base metal and gold mining issues rallied along with copper and bullion prices.

Potash Corp (POT.TO: Quote) led the gains by material issues, rising nearly 3 percent to C$43.85 as data showed a surge in imports by China, the world's largest buyer of fertilizer.

First Quantum Minerals (FM.TO: Quote) spiked 6 percent to C$22.88, as the Chinese data also revealed copper imports hit a record high in December.

The healthy data helped allay fears of a slowdown in China, the world's No. 2 economy and a top buyer of industrial metals and other commodities.

China is not going away, said John Hughes, senior mining analyst at Desjardins Securities. We came into last year with everybody worried about a slowdown in China because rates were going up.

Since the May period, the physical market showed nothing but a continual increase in terms of import levels.

The Toronto Stock Exchange's S&P/TSX composite index .GSPTSE was up 122.46 points, or 1 percent, at 12,319.18 by late morning. It touched a high of 12,346.82, its best level since November 9 when it hit 12,437.17.

Gold mining issues also rose as the U.S. dollar's decline against the euro made bullion more attractive to holders of other currencies. Gold's climb above its 200-day moving average, prompted fresh buying and helped lift Barrick Gold (ABX.TO: Quote) 0.9 percent to C$49.31.

Energy shares rose more than 1 percent as oil prices climbed above $113 a barrel on geopolitical tensions over Iran's nuclear program and threats by Tehran to shut the Strait of Hormuz, the world's most important oil shipping route.

Nexen Inc (NXY.TO: Quote) led the sector's gains, adding 9 percent to C$18.60. The oil and gas producer's bump came a day after it replaced Chief Executive Marvin Romanow and the head of its domestic operations.

A strong start to U.S. earnings season also helped sentiment, as U.S. aluminum giant Alcoa's (AA.N: Quote) positive outlook set the tone for North American markets.

Europe's financial crisis took a back seat but remained in view on worries about the health of euro zone banks as well as sovereign debt levels in Greece and other EU nations.

Toronto's financials, which have far less exposure to European debt holdings than most of their global counterparts, were up 0.7 percent, led by Royal Bank of Canada (RY.TO: Quote), whose shares rose 0.6 percent to C$52.55.

The outlook for the Canadian economy also improved as housing starts climbed more than expected in December, even as analysts predicted the once-hot sector would cool further in 2012.

($1=$1.02 Canadian)