The Toronto Stock Exchange's S&P/TSX composite index closed up 120.00 points, or 0.78 percent, at 15,469.91, its highest close since May 23.

It was buoyed by optimism that acceleration in U.S. economic growth will help the outlook for Canada's economy, said Peggy Bowie, senior trader at Manulife Asset Management.

U.S. factory activity rose in May, according to data on Thursday.

BlackBerry was among the most influential gainers, climbing nearly 8 percent to C$15.42 after Citron Research said it had a 24-month price target of $20 on expectations that BlackBerry will profit from the increasing application of its security and other software technology in various industries, such as automotive.

"The underlying feeling is that our market has a lot to offer, people just have to look at the right things," Bowie said.

The price of oil, a key Canadian export, was steady a day after diving 2.7 percent on higher OPEC crude output.

U.S. crude oil prices settled up 4 cents at $48.36 a barrel, helped by an industry report showing that U.S. stockpiles had fallen more than expected. [O/R]

Energy rose 1.1 percent, with Enbridge Inc the most influential advancer in the group, rising 1.3 percent to C$52.67.

The financials group gained 0.7 percent, helped in part by Element Fleet Management Corp, which rebounded after Wednesday's losses related to unfounded speculation that it was a short-selling target of hedge fund Muddy Waters.

Asanko Gold Inc fell 7.8 percent to C$2.02 a day after Muddy Waters said it was shorting the company's stock.

Recreational vehicle maker BRP Inc shares surged 12.7 percent to C$37.03 after it reported a much stronger-than-expected quarterly result and announced a quarterly dividend and share repurchase.

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

Materials, home to precious and base metals miners, slipped 0.3 percent, pinched by the price of gold, which dipped 0.5 percent to $1,265.7 an ounce after the U.S. data boosted the greenback, and nickel prices fell to an 11-month low on concerns of excess supply.[GOL/][MET/L]

Barrick Gold Corp fell 1.8 percent to C$21.95, while dairy producer Saputo Inc was down 3.8 percent at C$43.37 after reporting lower-than-expected quarterly profit.

(Additional reporting by Solarina Ho; Editing by Jonathan Oatis and Leslie Adler)

By Fergal Smith