The S&P/TSX composite index added 87.9 points to 12,293.38, with defensive health-care and telecommunications sectors leading the gain. The index rebounded from a 40 point loss just after it opened to a 167 point gain by mid-afternoon, before losing some steam just before the close.
The TSX Venture Exchange was down 7.45 points at 1,753.84.
Wall Street markets also turned around early losses to close higher. The Dow Jones added 140.88 points to 11,246.73, the Nasdaq index was up 40.4 points at 2,572.55 and the S&P index gained 15.81 points to 1,188.91.
Greece said the leaders of Greece, France and Germany stressed during an emergency teleconference that the debt-ridden country is an "integral" part of the eurozone, and that additional austerity measures Athens announced recently will ensure the country achieves its fiscal targets.
Fears that Greece was heading rapidly towards a chaotic default -- and the idea that it should potentially leave the euro and return to its own currency -- have roiled markets for days, both across the 17-nation eurozone and globally.
Greek Prime Minister George Papandreou, German Chancellor Angela Merkel and French President Nicolas Sarkozy discussed the issue late Wednesday in Europe.
Earlier, markets had bounced between positive and negative territory as traders weighed a less severe than expected downgrade of French banks while "overreacting" to weak U.S. retail sales figures for August, said Colin Cieszynski, market analyst at CMC Markets Canada.
"(Investors are) weighing what's going on in Europe with what's going on in the United States and... what might happen going forward," Cieszynski said.
"There are so many different rumours every day... it's leaving people fairly confused at the moment."
The Canadian dollar lost 0.55 of a cent to 100.93 cents US as commodity prices stepped back and investors took in a report on Canadian capacity utilization, a measure of productivity, which fell slightly to 78.4 per cent in the second quarter from 79 per cent in the prior quarter.
New data on American retail sales added to fears of another recession.
Consumers spent less last month on autos, clothing and furniture, leaving retail sales unchanged in August, the U.S. Commerce Department said. And, in addition to no growth in August, July was weaker than first thought, the department said.
The flat reading in August was a surprise given reports from retailers during the month that back-to-school shopping and auto sales appeared to have been strong compared with a year ago.
Still, those figures could have been a lot worse given the uncertainty of consumers in August, Cieszynski said.
"They could have easily been down a lot, which suggests that overall we may start to see some stabilization, but we need more data to make sure of that."
Other data from the U.S. showed companies paid the same amount for wholesale goods last month as a drop in energy prices offset higher food costs.
The October oil contract lost $1.30 to US$88.91 a barrel after the weak U.S. sales report. Weak retail spending suggests Americans will consume less fuel. Still, the energy index helped lead the TSX higher, up two per cent with shares in Suncor Energy Inc. (TSX:SU) three per cent or 87 cents to $29.44.
Copper shed seven cents to US$3.90 a pound. The mining sector on the TSX was up 0.2 per cent with shares in Teck Resources Ltd. (TSX:TCK.B) up 43 cents at C$39.16.
Gold futures fell $3.60 to US$1,826.50. The gold index was the biggest decliner on the TSX, with shares in Barrick Gold Corp. (TSX:ABX) down 59 cents at C$52.16.
Meanwhile, European markets made gains on the debt talks and despite a downgrade of two of France's biggest banks.
Moody's downgraded the credit ratings of French banks Societe Generale and Credit Agricole on Wednesday following a period of huge volatility in the markets as investors fretted about their exposure to Greek debt.
Some sort of move by Moody's had been widely expected this week since the agency had put them and rival BNP Paribas on review for downgrade in mid-June. But there had been fears that the downgrades might have even been harsher.
In addition, the Italian government passed a first vote on its austerity plan.
In Canadian corporate news, Air Canada (TSX:AC.B.T) could face its second work stoppage this year after flight attendants overwhelmingly endorsed a strike that could begin as early as next week. Shares lost three cents to $1.57.
Supermarket operator Empire Company Ltd. (TSX:EMP.A), which operates the Sobeys stores and has interests in real estate and movie theatres, said profits in the quarter ended Aug. 6 were $89.2 million or $1.31 per diluted share.
That compared with $86.3 million or $1.26 per share in year-earlier. Revenue was $4.15 billion, up from $4.02 billion. Shares added a penny to $57.16.
Gran Tierra Energy Inc. (TSX:GTE) has confirmed new oil discoveries in both Colombia and Argentina and says it plans additional drilling this year in those countries as well as in Brazil. Shares in the company added 19 cents to $5.96.
And Petrominerales Ltd. (TSX:PMG) said it is resuming oil production in Colombia after government authorities reopen access roads blocked by protesters. Shares gained $1.12 to $30.35.Suggest a correction