Gold jumped on the last trading day of 2012 to finish up six percent on the year on news of a possible U.S. fiscal deal, which lifted a market that had rallied earlier in the year on low interest rates, euro zone worries and central bank demand for bullion.
Other precious metals finished strongly, with palladium up nearly 10 percent on the year, silver up nine percent and platinum up eight percent. It was the 12th straight year of gains for gold, making it one of the longest bull runs ever in a commodity.
Oil, in contrast, has only been up for a fourth year since its rebound from the 2008 financial crisis. Analysts expect bullion -- which started 2012 at below $1,580 and scaled nearly $1,800 by October after the U.S. Federal Reserve rolled out a fresh economic stimulus -- to chart newer peaks in 2013. The market's all-time high above $1,930 was set in September 2011.
"If anything, gold's rally today with the removal of the US fiscal cliff proves that it's become a risk asset more than a safe haven," said Adam Sarhan at Sarhan Capital in New York.
Traditionally an inflation hedge and a market that investors rush to in times of trouble, gold has lately behaved more like an industrial commodity - rising and falling with the stock market and sometimes even following the dollar.
Worries about the so-called "fiscal cliff'' had weighed on markets for weeks as the White House and its rival Republicans in Congress sought to find ways to avert some $600 billion in tax hikes and spending cuts that could have sent the economy into another recession in 2013.
Obama cautioned at a news conference that a deal was imminent but not yet in hand. "Today it appears that an agreement to prevent this New Year's tax hike is within sight, but it is not done," the president said. "There are still issues left to resolve, but we're hopeful that Congress can get it done, but it's not done."