The Toronto Stock Exchange carried strong triple-digit gains during much of Wednesday’s trading session, but a late-day sell-off saw the benchmark index give back most of its gains.

The S&P/TSX composite index finished at 9,279.15, up 31.98 points, or 0.4%.

The heavyweight energy group led the gains, adding 1.7% as oil futures advanced. Crude for June delivery rose US$0.30, or 0.6%, to end at US$48.85 a barrel on the New York Mercantile Exchange.

Shares of EnCana Corp. jumped $2.21, or 4.2%, to close at $54.92 and Canadian Natural Resources Ltd. rose 2.4% to $56.59.

Also higher was Husky Energy Inc., up 2.8% to $29.90, and Petro-Canada, up 1.2% to $37.01.

Materials stocks pulled back into positive territory on Wednesday, finishing up 0.6%.

The sub-gold index also advanced on Wednesday, climbing 0.9% on gains for gold futures. Gold for June delivery gained US$9.80, or 1.1%, to US$892.50 an ounce on the Comex division of the New York Mercantile Exchange.

Shares of Iamgold Corp. rose 4.8% to $9.82 and Agnico-Eagle Mines Ltd. gained 1.5% to $56.58.

Barrick Gold Corp. added 1.1% to $35.05.

Lower for the day was Potash Corp., off $1.39, or 1.4%, to $100.40.

The financials group lagged on Wednesday, dipping 1.2%.

CIBC shares fell $1.15, or 2.2%, to $52.00 and Bank of Montreal gave up 2% to $38.86.

National Bank of Canada’s stock fell 3.1% to $43.53 and Sun Life Financial Inc. saw its shares fall 2.8% to $27.54.

The junior S&P/TSX Venture composite index gained 4.74 points, or 0.5%, to close at 979.12.

The Canadian dollar slipped a quarter of a cent to close at US80.65¢.

Meanwhile, markets in the U.S. let go of earlier gains to finish mostly lower after a series of corporate earnings reports.

The Dow Jones industrial average fell 82.99 points, or 1%, to 7,886.57.

The S&P 500 index declined 6.53 points, or 0.8%, to 843.55.

The Nasdaq composite index managed to climb 2.27 points, or 0.1%, to end at 1,646.12.

On the New York Stock Exchange, shares of Morgan Stanley tumbled 9% to US$22.44 after the company reported a net loss of US$190 million in the first quarter.

After the bell, Apple Inc. announced it earned $1.33 a share, or US$1.21-billion. The computer maker said its sales rose 9% to US$8.16 billion, higher than analysts were expecting.

IE