Updated from 1:02 p.m. EDT

Energy contracts declined and precious metals rose, while agricultural futures were mixed Wednesday.

Crude oil for April delivery was down $3.38 at $42.33 a barrel at the New York Mercantile Exchange. Heating oil was off almost 7 cents, and gasoline futures were down more than 4 cents. Natural gas ticked lower.

Prices declined after the Energy Department released its latest data on inventories. The government said crude stocks rose by 749,000 barrels in the week ended March 6, easily exceeding estimates for a build of around 200,000 barrels.

Gasoline inventories were the story, though, declining by a much bigger-than-expected 3 million barrels. Distillate inventories, meanwhile, rose by 2.1 million barrels, much higher than what had been projected by analysts.

As for precious metals, gold was up $14.80 at $910.70 an ounce, and silver gained 26 cents to $12.80 an ounce. Platinum and palladium advanced.

On the ag side, cocoa, coffee, frozen concentrated orange juice and cotton rose, but wheat, corn and soybeans fell. Meanwhile, cattle and hogs were little changed. In foreign-exchange trading, the dollar retreated against its major counterparts.

As for commodity-related stocks, oil majors Exxon Mobil ( XOM) and Chevron ( CVX) pulled back. Miner Freeport-McMoRan ( FCX) added 4.1% to $35.56.

Seed and ag concern Monsanto ( MON) was up 4.6% at $81.24. Bunge ( BG) lost 2.2% to $50.22, and Potash Corp. of Saskatchewan ( POT) climbed 4.2% to $78.14.

The Market Vectors Agribusiness ( MOO) exchange-traded fund was up 2.4% at $27.36, and the U.S. Oil ( USO) fund was down 5.5% at $26.30. The Gold Shares ( GLD) were better by 1.2% at $89.22.

More from Commodities

Watch This If You're Wondering How Much Gold to Have and When to Sell

Watch This If You're Wondering How Much Gold to Have and When to Sell

How Can Gold Continue This Upward Momentum?

How Can Gold Continue This Upward Momentum?

Week Ahead: Investors Keep Economy in Check as Trade, North Korea Talks in Limbo

Week Ahead: Investors Keep Economy in Check as Trade, North Korea Talks in Limbo

Oil Rally Steadies Even as Potential Supply Disruptions Persist

Oil Rally Steadies Even as Potential Supply Disruptions Persist

The Outlook for Gold Prices Looks Awful Even With 10-Year Yields Above 3%

The Outlook for Gold Prices Looks Awful Even With 10-Year Yields Above 3%