The Standard & Poor’s GSCI gauge of 24 commodities rose 1 percent to settle at 662.14 at 4 p.m. in New York, paced by a surge in gasoline futures.
The UBS Bloomberg CMCI index of 26 raw materials advanced 0.4 percent to 1,564.50.
Gasoline jumped to a 15-week high on declining inventories, higher demand and rally in Brent crude oil.
The Energy Department reported gasoline supplies dropped 2.37 million barrels to 203.7 million, the lowest since the week ended June 15 and the lowest for this time of the year since 2008. Wholesale demand jumped to a 13-month high.
On the New York Mercantile Exchange, gasoline futures for September delivery gained 2.8 percent to $3.084 a gallon, the highest settlement since May 1.
Crude oil climbed to a three-month high after the Energy Department reported a decline in stockpiles and Saudi Arabia called on its citizens to leave Lebanon, adding to tension in the Middle East.
On the Nymex, oil futures for September delivery rose 1 percent to $94.33 a barrel, after reaching $94.90, the highest since May 15.
Brent crude for September settlement, which expires tomorrow, advanced 1.8 percent to $116.10 on the London-based ICE Futures Europe exchange. The more-active October contract gained 1.8 percent, to $114.19.
Vitol Group failed to sell cargoes of Urals in northwest Europe and a shipment of Nigeria’s Escravos grade.
Natural gas dropped in New York as forecasts for cooler weather signaled reduced demand from electricity generators.
On the Nymex, gas futures for September delivery slid 3 percent to $2.748 per million British thermal units.
U.K. natural gas for same-day delivery declined by the most in 10 weeks as demand fell.
Same-day gas fell 2.6 pence, or 4.7 percent, to 53.2 pence a therm at 4:37 p.m. London time. September gas declined 1.5
Gold advanced after a U.S. report showing stagnant consumer prices bolstered prospects that the Federal Reserve will take further steps to spur growth, reviving inflation and demand for the metal as a hedge.
On the Comex in New York, gold futures for December delivery climbed 0.3 percent to $1,606.60 an ounce.
Silver futures for December delivery rose 0.2 percent to $27.896 an ounce.
On the New York Mercantile Exchange, platinum futures for October delivery fell 0.2 percent to $1,396.20 an ounce.
Copper fell for the third time in four sessions on concern that economic growth is slowing in China, the world’s biggest metals consumer.
On the Comex, copper futures for December delivery slid 0.3 percent to $3.361 a pound. The metal has dropped 3.9 percent this quarter.
On the London Metal Exchange, copper for delivery in three months slumped 0.4 percent to $7,385.50 a ton ($3.35 a pound).
Arabica-coffee futures capped the longest drop in six months on signs that supply will remain ample.
On ICE Futures U.S. in New York, arabica coffee for December delivery dropped 0.6 percent to $1.6495 a pound, the seventh straight loss and the longest slide since Feb. 16.
Orange-juice futures for November delivery jumped 4.6 percent to $1.0935 a pound.
Cotton futures for December delivery climbed 1.4 percent to 73.11 cents a pound.
Cocoa futures for December delivery dropped 0.2 percent to $2,436 a metric ton.
Soybeans and corn rose for the first time this week on speculation that the U.S. government may have underestimated crop damage from the hottest July since 1936. Wheat gained.
On the Chicago Board of Trade, soybean futures for November delivery increased 2.3 percent to $16.345 a bushel, after falling 2.8 percent in the first two days of this week.
Corn futures for December delivery rose 1.9 percent to $8.04 a bushel, the first gain in three sessions.
Hog futures posted the biggest drop in more than a week on signs of increasing supplies available to U.S. pork processors.
On the Chicago Mercantile Exchange, hog futures for October settlement fell 2.4 percent to 75.6 cents a pound, the biggest loss since Aug. 3.
Cattle futures for October delivery slipped 0.2 percent to $1.2665 a pound, after reaching $1.27225, the highest for a most-active contract since March 6.