NEW YORK — Gold touched its highest price in nearly seven years Monday as investors sought safety amid worries that rising U.S.-Iran tensions could lead to war.

Stocks in Asia and Europe retreated as dollars flowed out of riskier investments, but the U.S. market shook off its morning losses to grind out a modest gain. After dropping 0.6% as soon as trading opened, the S&P 500 pushed steadily higher through the day and ended up recovering half its sharp loss from Friday.

The S&P 500 climbed 11.43 points, or 0.4%, to 3,246.28. The Dow Jones Industrial Average erased an early morning loss of 216 points en route to a gain of 68.50 points, or 0.2%, to 28,703.38, and the Nasdaq composite rose 50.70 points, or 0.6%, to 9,071.46.

Caution has been seeping through markets since early Friday, when a U.S. drone strike killed Iranian Gen. Qassem Soleimani in Iraq. Both the United States and Iran have since talked up the threat of violence, which pushed up the price of gold as money flowed into investments seen as safer. Gold neared $1,591 per ounce during morning trading and reached its highest level since April 2013.

Gold settled at $1,566.20 per ounce, up $17, and it’s climbed more than $40 since before Soleimani’s killing.

Gold has historically performed well around past military conflicts, such as the two Persian Gulf wars and the Sept. 11, 2001 attacks, even after taking into account interest rates and the dollar’s movements, according to Goldman Sachs commodities analysts.

“The escalation in the Middle East was both unexpected and unwelcome,” said Craig Erlam, senior market analyst at trading platform OANDA Europe. “Investors are now fully in defensive mode, hoping for the best but fearing the worst.”

U.S. stocks seemed set to fall a second straight day Monday on those same worries, but gains for oil producers and big internet companies made up for drops by industrial companies and banks.

Welcome to the discussion.

Keep it Clean. Please avoid obscene, vulgar, lewd, racist or sexually-oriented language.
Don't Threaten. Threats of harming another person will not be tolerated.
Be Truthful. Don't knowingly lie about anyone or anything.
Be Nice. No racism, sexism or any sort of -ism that is degrading to another person.
Be Proactive. Use the 'Report' link on each comment to let us know of abusive posts.
Share with Us. We'd love to hear eyewitness accounts, the history behind an article.