The S&P/TSX composite index added 105.99 points to 12,338.85. The TSX Venture Exchange pushed ahead 15.45 points to 1,322.31.
Spain and Greece outlined plans to cut spending and raise taxes to convince international lenders and financial markets they are on the right track to cut their deficits.
The Canadian dollar gained 0.45 of a cent to 101.95 cents U.S., getting a boost after Spain announced its new budget.
The cuts in Spain are meant to show world investors and other countries that Spain can meet fiscal targets. The budget unveiling lifted stock markets from what had been only modest gains.
Wall Street was also higher, with the Dow ahead 72.46 points to 13,485.97 and the Nasdaq 42.90 points higher at 3,136.60. The broader S&P 500 was up 13.83 points at 1,447.15.
Gold prices gained more than one per cent Thursday, adding $26.90 to hit a new seven-month high of US$1,780.50 an ounce. The last time it traded at that level was Feb. 28.
In turn, the gold-heavy materials sector was one of the biggest gainers on the TSX, up two per cent for the day with shares in Barrick Gold Corp. (TSX:ABX) up 1.6 per cent or 66 cents to $40.97.
The benchmark New York oil contract was ahead $1.87 at US$91.85 a barrel, while the December copper contract was three cents higher at US$3.74 a pound. The mining sector was also ahead two per cent.
The gains also came amid expectations that the People's Bank of China will soon take more steps to stimulate the world's No. 2 economy, which has been slowing.
Worries about a slowing Chinese economy have combined with unrest in Europe to pressure the market this month.
And even as those worries persist, and the U.S. continues to churn out mixed economic data, sentiment will likely be buoyed into Friday, the last trading day of the third quarter, said Sadiq Adatia, chief investment officer at Sun Life Global Investments.
"I think people do want to buy some good names heading into Q4 and want to show that on their books ... I think they're actually jumping in anticipation of what's going to happen in Q4," Adatia said.
"You've seen a little bit of a selloff in the past few days ... but I think they're going to be back to slowly buying up things and moving this marker a little higher up."
The measures outlined Thursday by Spain and Greece highlight how Europe's struggling countries are battling public anger and flat-lining economies to push for more austerity — all with the aim of securing much-needed aid.
Investors were also reacting to a positive sign in a U.S. Commerce Department report on August business orders for durable goods. While the overall number dropped because of a huge decline in commercial aircraft orders, orders for machinery, electronics and other equipment rose 1.1 per cent, the first increase since May.
However, a less positive sign came in another report from the Commerce Department which said the U.S. economy grew even more sluggishly in the April-to-June quarter than previously thought. The agency revised the annual growth rate to 1.3 per cent, down from its previous estimate of 1.7 per cent.
Meanwhile, the number of Americans who signed contracts to buy previously occupied homes fell in August from a two-year high in July.
Investors also got word from the U.S. Labour Department that the number of Americans seeking unemployment benefits last week plunged to the lowest level in nine weeks, a hopeful sign for the job market.
In Canada, traders took in a Statistics Canada report that the average weekly earnings for non-farm payroll employees was $906.68 in July, up 1.1 per cent from the previous month.
In Canadian corporate news, Research In Motion (TSX:RIM) shares gained almost 18 per cent in after-hours trading in New York around 5 p.m. ET after its losses were not as steep as analyst had expected. The BlackBerry maker reported after markets closed that it lost US$235 million or 45 cents in the second quarter, compared with a profit of $329 million or 63 cents per share a year ago.
Excluding one-time costs such as cost cuts and job reductions, RIM says it had an adjusted loss of $142 million or 27 cents per share. Analysts had expected RIM to post a loss of about 47 cents per share, according to a poll from Bloomberg.
Revenue totalled $2.87 billion, down from $4.17 billion a year ago. RIM shares closed up one per cent or eight cents at $6.96 in regular trading.
And optical drug developer QLT Inc. (TSX:QLT) said Thursday it plans to buy back up to 3.4 million of its shares over the next year as the first step in a plan to return $100 million to stockholders. The plan follows the sale by QLT earlier this week of Visudyne, its flagship drug, to Valeant Pharmaceuticals Inc. (TSX:VRX) for $112.5 million. Its shares shed three cents to $7.70.
Canadian National Railway (TSX:CNR) is testing two natural gas-fired locomotives in Alberta's oilsands region to see if it's feasible to switch from diesel to a fuel that's cheap, plentiful and relatively clean. The retrofitted diesel locomotives will run along the 480-kilometre corridor between the Edmonton area and Fort McMurray, Alta. Shares added six cents $87.49.