Gold was steady as traders weighed weaker-than-expected inflation data and escalating attacks in the Middle East, looking for clues to the Federal Reserve's interest rate path.

The precious metal was near $4,060 an ounce in early trading, after ending the previous session up 0.2%. The Bloomberg Dollar Index and Treasury yields fell on Wednesday after a key measure of U.S. producer price inflation showed that pressures were easing ahead of the latest escalation in the Iran trade war.

However, the June figures did not reflect the latest round of hostilities between the United States and Iran. A temporary peace agreement signed last month effectively collapsed, with Washington launching airstrikes for the fifth consecutive day, and President Donald Trump vowing to intensify the bombing until Tehran stops attacking ships and reopens the Strait of Hormuz.

Gold has traded near $4,000 an ounce in recent weeks, after losing 14% in the second quarter, its worst performance since 2013. That decline was driven by expectations that the Federal Reserve might raise interest rates to manage inflationary pressures resulting from the war, which would be a headwind for gold, which does not yield returns.

Interest rate trajectory under pressure from inflation and war

The sharp and unexpected slowdown in June's inflation may have given the US Federal Reserve more time to consider its options. However, with the conflict intensifying again, any respite may prove short-lived. Oil rose for a fourth day on Thursday.

Federal Reserve Chairman Kevin Warsh explained that interest rates are among the options available to keep inflation within the stated target of 2%, but he softened his hawkish comments by expressing a willingness to be patient.

During a discussion with lawmakers on Wednesday, he rejected comments that the surge in investment in artificial intelligence is fueling inflation, while saying he has repeatedly told Trump that he is independent.

In a disagreement over how the Federal Reserve should handle the effects of artificial intelligence, Governor Lisa Cook said in remarks on Wednesday that she is prepared to act if inflation remains high.

However, New York Federal Reserve President John Williams said that interest rates are in a favorable position to bring inflation back toward the Federal Reserve's 2% target.

Spot gold fell 0.1% to $4,057.05 an ounce at 7:49 a.m. in Singapore. Silver was steady at $57.78 an ounce. Platinum and palladium edged lower, and the Bloomberg Dollar Index was flat after falling 0.3% in the previous session.