NEW YORK (AP) — Oil prices and stock markets worldwide kept swinging with uncertainty about what will happen with the Iran war. The S&P 500 swiveled between gains and losses in the morning before ending 0.1% lower Monday, its second straight drop since setting an all-time high last week. The Dow Jones Industrial Average added 0.3%, and the Nasdaq composite fell 0.5%. Stock prices moved in the opposite direction of oil prices, which went from an overnight pop higher to a drop and then yo-yoed again. The latest drop for oil came late in the day after President Donald Trump said he would hold off on a military attack on Iran scheduled for Tuesday.

THIS IS A BREAKING NEWS UPDATE. AP’s earlier story follows below.

NEW YORK (AP) — Oil prices and stock markets worldwide kept swinging Monday with uncertainty about what will happen with the Iran war.

The S&P 500 swiveled between gains and losses through the morning before sinking 0.4%. It’s heading toward its second straight drop since setting an all-time high last week. The Dow Jones Industrial Average was up 17 points, or less than 0.1%, with half an hour remaining in trading, and the Nasdaq composite was 0.9% lower.

Stock prices moved in the opposite direction of oil prices, which have been swinging on uncertainty about how long the Iran war will keep the Strait of Hormuz closed and prevent oil tankers from delivering crude. The price for a barrel of Brent crude oil, the international standard, went from a high of $112 overnight to as low as $107 during the morning before turning back higher.

After settling at $112.10 per barrel, the price for a barrel of Brent then fell back below $110 after President Donald Trump said late in the day that he would hold off on a military attack on Iran scheduled for Tuesday at the request of allies in the region. That kept alive hopes that a deal to open the Strait of Hormuz may still be possible.

The moves for oil prices have helped make the world’s bond markets the center of the action recently. Climbing yields there have cranked up the pressure on economies and stock markets worldwide.

Higher yields make it more expensive for households and businesses to borrow, which U.S. homebuyers are all too familiar with because of higher mortgage rates. Higher interest rates could also make it more difficult for companies to borrow to build huge data centers for artificial-intelligence technology, which has been driving much of the U.S. economy’s growth.

In the bond market, the yield on the 10-year Treasury rose to 4.60% from 4.59% late Friday after swinging through the day and getting as high as 4.63%. The yield on the 10-year Japanese government bond rallied toward its highest level since the late 1990s.

Yields worldwide have been climbing on fears about higher inflation caused by higher oil prices, which in turn could push central banks not only to abandon the possibility of cutting interest rates but also consider hiking rates. Higher rates would slow inflation but at the cost of hurting the economy and dragging on prices for stocks and other investments.

Several solid reports on the U.S. economy recently, along with worries about the U.S. government’s huge and growing debt problem, are also pushing upward on yields.

On Wall Street, Regeneron Pharmaceuticals dropped 10.2% to help lead the U.S. stock market lower after reporting discouraging data from a trial of a treatment for melanoma.

Delta Air Lines lost 0.2% because of higher oil prices and gave up an early gain won following news that Berkshire Hathaway bought more than $2.6 billion of the airline’s stock. Berkshire Hathaway built a reputation as a value investor able to buy stocks at low prices under its former leader, Warren Buffett.

NextEra Energy fell 5.6% after agreeing to buy Dominion Energy in an all-stock deal to create the world’s largest regulated electric utility by market value. Dominion rallied 8.6%.

Boston Scientific was another winner and climbed 6.6% after saying it would spend $2 billion on its previously announced stock buyback program of $5 billion by the end of June. Such purchases send cash directly to investors and boost the company’s per-share earnings.

This upcoming week will offer little in terms of data on the U.S. economy, but a heavily anticipated report on Nvidia’s latest quarterly results will arrive Wednesday. The chip company has routinely blown past analysts’ expectations each quarter, while forecasting even bigger growth than Wall Street had thought. It will likely need to keep up such momentum to keep AI stocks driving the market to more records.

Target, Home Depot and Walmart will also report their latest quarterly results this week.

In stock markets abroad, indexes fell in much of Asia but reversed losses in Europe to finish higher as oil prices swung through the day. Japan’s Nikkei 225 sank 1%, but Germany’s DAX returned 1.5% for two of the world’s bigger moves.

___

AP Business Writers Chan Ho-him and Matt Ott contributed to this report.