Gold prices gained on Monday as the dollar weakened and optimism over a possible US-Iran agreement sent oil prices sharply lower, tempering inflation fears and expectations of prolonged high interest rates. Spot gold was up 0.3% at $4,052.96 per ounce, as of 1221 GMT. US gold futures edged 0.2% higher to $4,051.70. The precious metal posted its first monthly rise in five in July, rising about 1%. Oil prices slumped more than $4 a barrel, after US President Donald Trump held off a fresh attack on Iran as he sought a quick deal that would halt Tehran's nuclear ambitions and reopen the Strait of Hormuz. Trump said that talks with Iran will happen on Monday but declined to set a deadline for an agreement, although Iran said there were no talks under way with the United States. "We are back to the previous correlation, with gold rising when crude oil falls, and gold falling when oil rises... The lower oil price is today reducing modestly US rate hike expectations for this year, and supporting gold," UBS analyst Giovanni Staunovo said. Elevated oil prices stoke concerns around inflation and higher interest rates, diminishing bullion's appeal as a non-yielding asset. Further supporting gold, the US dollar came under pressure, hitting its lowest since mid-June, after authorities intervened in the foreign exchange market to support the yen, while yields on the benchmark 10-year US Treasury note also fell. Also in focus is a set of US jobs reports due this week, including the ADP employment report, and nonfarm payrolls data. "A weaker US job market would allow the Fed to keep rates on hold this year, and that would be positive for gold, as the market prices out rate hikes for this year," Staunovo said. Three US Federal Reserve officials who dissented at the policy meeting last week in favour of a rate hike expressed concerns on Friday that without an immediate increase in short-term borrowing costs, inflation will stay stuck above the Fed's 2% target. Spot silver gained 0.2% to $57.77, while platinum lost 0.7% to $1,630.78, and palladium fell 0.8% to $1,263.20.