Gold futures on the COMEX division of the New York Mercantile Exchange notched a quarterly gain of about 8.4 percent on Friday, marking its best quarter in a year, as uncertainty over U.S. President Donald Trump's tax and investment plans and elections in Europe fueled demand for bullion as a safe haven.
Gold rebounded from early losses as the dollar turned flat after a Federal Reserve official's seemingly dovish remarks and uninspiring data on the U.S. economy tamped down the sanguine mood from earlier this week.
The most active gold contract for June delivery rose 3.2 U.S. dollars, or 0.26 percent, to settle at 1,251.2 dollars per ounce.
The trading trend for precious metals came as the U.S. Dollar Index, a measure of the buck against a basket of six rival currencies, traded little-changed for the session, but down about 1.8 percent for the quarter.
Commodities priced in dollars often trade inversely with the dollar, as moves in the U.S. unit can influence the attractiveness of those commodities to holders of other currencies.
Most important on the upside for gold "has been the looming French elections, the five-year highs in headline inflation, and investors' disappointment with the Federal Reserve," said Adrian Ash, head of research at BullionVault.
Silver for May delivery rose 5 cents, or 0.27 percent, to close at 18.256 dollars per ounce. Platinum for July delivery fell 3.3 dollars, or 0.35 percent, to close at 952.40 dollars per ounce.