Gold extended gains for a second straight session on Tuesday as worries over Greece’s future in the euro zone and a decline in global equities supported the safe-haven metal.

Spot gold rose 0.3 per cent to $1,242.90 an ounce by 0315 GMT, after gaining 0.5 per cent on Monday. The metal had hit a three-week low of $1,228.25 last week.

Bullion got a boost as nervousness over Greece potentially withdrawing from the euro and escalating conflict in Ukraine sapped the risk appetite and hurt stocks.

“With ongoing concerns surrounding Greece and a potential default, as well as the Ukraine crisis, gold should find support and hold above the 55-day moving average at $1,225 and 100-day moving average at $1,217 in the near term,’’ said Jason Cerisola, a metals dealer at MKS Group.

The probability of Greece leaving the euro zone has risen several notches as Prime Minister Alexis Tsipras has taken an increasingly hardline over government debt.

Tsipras has insisted that his country would not extend its reform-linked bailout.

European Commission President Jean-Claude Juncker has warned Greece not to expect the euro zone to bow to Tsipras’ demands in a growing confrontation that spooked financial markets and prompted US and Canadian pleas for calm and compromise.

“It is hard to conceive of gold selling off substantially given the prevailing uncertainty and considering the very real possibility that Greece could now default on its debts,’’ said INTL FCStone analyst Edward Meir.

Investors tend to bid up gold during times of economic and geopolitical uncertainties.

Markets were also eyeing developments in Ukraine.

US President Barack Obama had signalled on Monday that he will wait for the results of high-stakes talks on Ukraine before deciding whether to arm the Kiev government.

Also helping the precious metal was the fading rally in the US dollar.

The dollar index, a measure of the greenback’s strength against a basket of major currencies, dipped slightly as commodity currencies and the euro edged higher, though it still wasn’t too far from a 11-year peak.

A stronger greenback makes dollar-denominated gold more expensive for holders of other currencies.