The benchmark index of the Toronto Stock Exchange surged 2% on Wednesday, as energy and resources shares rallied.

The S&P/TSX composite index jumped 286.29 points, or 2.19%, to close at 13,350.14. All 10 of the TSX main groups finished higher.

The energy and materials sectors climbed 4.6% and 1.8%, respectively.

The price of oil bounced back near US$115 a barrel, as traders shrugged off a massive increase in U.S. crude inventories and focused on possible supply threats.

Light, sweet crude for September delivery rose 45¢ cents to US$114.98 a barrel on the New York Mercantile Exchange. The September contract expired today; the October contract finished up US$1.01 at US$115.56 a barrel.

In Toronto, Canadian Natural Resources was up 7.5% at $88.40. Suncor Energy climbed 6.4% to $59.89.

In the materials group, fertilizer producer Agrium added 4% to $89.80.

The financials group shook off a three-day slump to rise 1.2%. Canada’s banks are set to report quarterly results next week.

Bank of Nova Scotia gained 1.5% to $47.80, and CIBC was up 1.5% at $59.33

In other corporate news, shares in Maple Leaf Foods declined 11¢, or 1%, to $10.59 after the company said it is expanding a recall of its packaged meats and temporarily closing a Toronto plant that prepares the products. A number of the affected products are part of a listeriosis outbreak investigation.

The junior S&P/TSX Venture composite index gained 18.02 points, or 0.95%, to end at 1,919.75.

The Canadian dollar slipped 0.2¢ from Tuesday’s close to finish at US94.23¢.

In New York, U.S. stocks rose after Hewlett-Packard posted reassuring results and bank shares rebounded. The Dow ended a two-day losing streak.

The Dow Jones industrial average rose 68.88 points, or 0.61%, to 11, 417.43. The S&P 500 gained 7.85 points, or 0.62%, to 1,274.54, and the tech-heavy Nasdaq composite index added 4.72 points, or 0.20%, to 2,389.08.