Oil prices reached six-month highs on worries about global supply outages and as long-time bear Goldman Sachs sounded more positive on the market. [O/R]

"Over this year Canada looks like an attractive investment opportunity, I think oil is going to finish higher than where it is right now," said Kevin Headland, senior investment strategist at Manulife Investments.

U.S. crude prices were up 3.6 percent to $47.89 a barrel, while Brent crude added 2.6 percent to $49.08.

The most influential movers on the index included Suncor Energy Inc (>> Suncor Energy Inc.), up 2.7 percent at C$34.98, and Canadian Natural Resources (>> Canadian Natural Resources Limited), which added 2.1 percent at C$37.73.

Barrick Gold Corp (>> Barrick Gold Corp.) advanced 2.3 percent to C$24.41, and Goldcorp Inc (>> Goldcorp Inc.) rose 2.6 percent to C$23.85.

The energy group climbed 2.9 percent, while the materials group, which includes precious and base metals miners and fertilizer companies, added 1.9 percent.

The Toronto Stock Exchange's S&P/TSX composite index <.GSPTSE> closed up 144.91 points, or 1.05 percent, at 13,893.49.

It touched its highest level since May 2 of 13,930.61, with all of the index's 10 main groups ending higher.

The index has rallied more than 20 percent since hitting an almost 3-1/2-year low in January, but has been unable to climb above the 14,000 threshold.

"It's going to be a key resistance level," said Headland, who cautioned earnings have been "lackluster."

The heavyweight financials group gained 0.3 percent, led by a 3.7 percent gain for Brookfield Asset Management Inc (>> Brookfield Asset Management Inc) to C$44.50, while consumer staples rose 1.1 percent.

Valeant Pharmaceuticals International Inc (>> Valeant Pharmaceuticals Intl Inc) rose 3.8 percent to C$34.85. The company said it would cut prices for hospitals on two heart drugs after shareholder William Ackman pledged to revisit controversial price hikes on the treatments.

Shares in Penn West Petroleum Ltd (>> Penn West Petroleum Ltd) sank 21.9 percent to 82 Canadian cents a share after it said it may default on its financial covenants at the end of the second quarter and raised doubts about its ability to continue as a going concern.

(Reporting by Alastair Sharp; Editing by Bernadette Baum and Andrew Hay)

By Fergal Smith