Commodities stocks buoyed Toronto markets Friday, as energy and metals stocks saw gains after three days of losses.

The S&P/TSX composite index closed up 137.54 points, or 0.98%, at 14,103.87, as six of the 10 major TSX groups posted gained.

The materials group climbed 2.51%, as the gold sub-index gained 1.78%.

Gold for June delivery ended up 30¢ at US$889.70 an ounce on the New York Mercantile Exchange.

Barrick Gold Corp. stock closed up 51¢, or 1.28%, at $40.31. Goldcorp Inc. shares gained 59¢, or 1.61%, to close at $37.34 and Kinross Gold Corp. shares rose 19¢, or 0.97%, to end at $19.84.

Meanwhile shares in mega-player Potash Corp. gained $13.50, or 6.86%, to close at $210.40.

The heavyweight energy group also pushed markets up, gaining 2.16%, as crude oil futures jumped more than US$2 a barrel on news that a U.S. cargo ship fired at two Iranian boats. The June crude contract gained US$2.46, or 2.1%, to close at US$118.52 a barrel on the New York Mercantile Exchange.

Shares in Nexen Inc. climbed again today. The firm’s stock gained $1.33, or 3.76%, to close at $36.72. Meanwhile, Talisman Energy Inc. shares fell 22¢, or 1.08%, to close at $20.22.

The financials group closed flat, losing just 0.08%.

CIBC shares closed up 15¢, or 0.21%, at $71.50, while Bank of Nova Scotia shares gained 37¢, or 0.77%, to close at $48.25.

In other corporate news, Brookfield Properties Corp. shares lost 38¢, or 1.83%, to close at $20.34, after it announced that first quarter profits tumbled more than 50%.

The junior S&P/TSX Venture composite index closed up 10.10 points, or 0.41%, at 2489.20.

The Canadian dollar closed out at US98.40¢, down 0.20 of a cent from yesterday’s close.

In New York, markets rallied in the afternoon to make up for losses spurred by grim consumer confidence data and weak earnings news from Microsoft Corp.

On Thursday, Microsoft announced its quarterly profit dropped 11% to US$4.39 billion, as sales in the software divisions fell, making investors wary.

The Dow Jones industrial average closed up 42.91 points, or 0.33%, at 12,891.86. For the week, the Dow rose 0.3%.

The S&P 500 gained 9.02 points, or 0.65%, to close at 1,397.84. The S&P 500 gained 0.5% for the week.

The tech-heavy Nasdaq composite closed down 5.99 points, or 0.25%, at 2,422.93. The Nasdaq advanced 0.8% overall for the week.