Gold firmed on Monday, as the prospect of a Greek debt default hit global shares, offsetting wariness among investors over the metal's longer-term outlook.
Greece will not pay a 1.6 billon euro loan installment due to the International Monetary Fund on Tuesday, a Greek government official told Reuters.
Gold, which often benefits from uncertainty in the wider financial markets, initially rallied to a near one-week high at $1,186.91, but later gave up some of those gains.
was up 0.3 percent at $1,178.40 an ounce, on track to close the second quarter down 0.3 percent, the fourth straight weak quarter.
U.S. gold futures for August delivery settled up 0.5 percent at $1,179 an ounce.
The wider environment remains relatively unfriendly for gold, with the United States still likely to raise interest rates at some point this year. That would increase the opportunity cost of holding non-yielding gold.
"Gold historically has always been the safe, tangible commodity which had appeal in times of turbulence, but recently, gold has increasingly trading off U.S. rate hike expectations, and how the dollar performs against the euro," ING analyst Hamza Khan said.
"Today we have all of this concern around Grexit creating bullish sentiment for gold, but at the same time we have weakness in the euro creating bearish sentiment for gold, and they're effectively canceling each other out."
Holdings of the world's largest gold-backed exchange-traded fund, New York-listed SPDR Gold Shares, posted their biggest rise since early February last week at 9.5 tons.
"Broad investor interest has become relatively positive," Barclays Capital said in a note.
Spot palladium fell to a two-year low at $663.25 an ounce, and was on track to finish the quarter down 9.2 percent and fall for the second straight quarter.
"There is a large overhang of above-ground stocks out there, as per estimates. We're eating into that inventory each year," said Mike Dragosits, senior commodity strategist for TD Securities in Toronto.