Investors turned to gold Wednesday amid concerns about Greece's ability to deal with its financial crisis.
Gold, silver and grain prices rose while energy products retreated.
Greece's borrowing costs rose and its stock market retreated Wednesday. Investors worried that the country would be unable to contain its budget problems and could default on its debt. A Greek default would be a serious blow to the 16-nation euro.
"We've seen a lot of gold buying as that safe haven or currency type hedge play," said Dave Meger, director of metals trading at Vision Financial Markets.
Gold for June delivery rose $17 to settle at $1,153 an ounce.
In other metals, May silver rose 26.8 cents to settle at $18.199 an ounce, while May copper fell 1.95 cents to $3.5975 a pound. Platinum for April delivery rose $18.70 to $1,717.20 and June palladium rose $3.85 to $512.35.
Wheat, corn and soybeans all settled higher. Commodity analyst Tom Leffler cited a variety of reasons, from some technical buying to concerns about cold weather affecting the wheat crop.
In addition, the dollar grew weaker after a stronger start on the session. "When you put them all together, and considering we've been holding at low prices, it gave the market a reason to rally," Leffler said.
Wheat for July delivery rose 11.5 cents to $4.8875 a bushel. In May contracts, soybeans rose 8 cents to $9.525 a bushel and corn rose 10 cents to $3.5650 a bushel.
The ICE Futures US dollar index, which measures the dollar against six currencies, rose 0.07 percent.
Energy prices fell across the board after the Energy Information Administration said crude supplies were bigger than expected last week.
Benchmark crude for May delivery fell 96 cents to $85.88 a barrel on the New York Mercantile Exchange.
In other Nymex trading in May contracts, heating oil fell 2.44 cents to settle at $2.2439 gallon, gasoline lost 3.36 cents to settle at $2.3147 a gallon and natural gas fell 7.7 cents to settle at $4.019 per 1,000 cubic feet.
© Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.