Stocks closed higher Thursday, led by gains in retailers and media and energy companies and more in Thursday’s Stock Market Update.

The gains were initially fueled by rising oil prices, which boosted energy companies following a suspected attack on two oil tankers in the strategic Strait of Hormuz. The U.S. blamed Iran in what it called a campaign of “escalating tensions” in a region crucial to global energy supplies.

The sector sustained its gains as a mix of media, internet and technology companies took the lead in pushing every major index higher.

U.S. oil rose 2.1% and Brent crude, the international benchmark, gained 2.5%. The gains come at a time when oil prices have been falling on signs demand is declining. Exxon rose 0.8% while Schlumberger gained 3.4%.

Amazon’s 0.8% gain led a mix of consumer-oriented stocks higher, including home improvement retailers Home Depot and Lowe’s. Those companies caught an extra boost from the latest mortgage rate figures, which remain near historic lows.

A 4.4% gain for Walt Disney lead media and internet companies higher. Google rose 1.1% and Facebook gained 1.3%.

STOCK MARKET UPDATE

The S&P 500 index rose 11 points, or 0.4%, to 2,891. It was the index’s first gain in three days. The Dow Jones Industrial Average gained 101 points, or 0.4%, to 26,106. The Nasdaq rose 44 points, or 0.6%, to 7,837.

Bond prices rose and the yield on the 10 year Treasury slipped to 2.10%.

The surge in oil prices lifted shares of oil services companies and oil producers. The incident in the Strait of Hormuz comes amid heightened tensions between the United States and Iran. One third of all oil traded by sea, which amounts to 20% of oil traded worldwide, passes through the strait.

Thursday’s gains marked a reversal of course for oil prices, which dragged down the energy sector on Wednesday and have fallen more than 20% since late April. Still, analysts questioned whether the gains can hold. Jim Ritterbusch of Ritterbusch & Associates said in a note to clients the jump is factoring in a worst case scenario and oil is “apt to relinquish the bulk of gains as additional details emerge.”

In addition, OPEC added to the recent concerns among traders that global demand is slipping. In its latest monthly report on the oil market, OPEC forecast demand would grow by 1.4 million barrels a day in 2019, down by 700,000 barrels a day from its previous forecast. OPEC said it lowered the forecast due to “sluggish oil demand data” from Western countries during the first quarter. While global demand appears to be slipping, supplies remain high.

Consumer-oriented stocks and financial companies also gained ground. Macy’s rose 1.4% and Foot Locker rose 2.0%. Bank of New York Mellon rose 0.9%.

Solid earnings and forecasts helped lift several stocks.

Lululemon rose 2.1% after stretching beyond Wall Street’s profit and revenue forecasts for the first quarter. The maker of athletic apparel popular with yoga practitioners also raised its profit forecast for the year.

Furniture and houseware retailer RH surged 15.8% after the company blew past Wall Street’s first quarter profit forecasts and raised its own profit forecast for the year. The company said that it raised some prices to offset the impact of tariffs and plans on moving some production out of China.

Homebuilders broadly rose as investor confidence for the housing sector remained solid amid historically low mortgage interest rates. Mortgage buyer Freddie Mac says the average rate on the 30-year, fixed-rate mortgage held steady from last week at 3.82%, its lowest point since September 2017. Lennar and KB Home each rose about 2%.

Higher fares gave major airlines a boost. American Airlines confirmed that it raised domestic fares $5 each way. J.P. Morgan said Southwest Airlines followed by raising prices on tickets bought within a week of the flight and favored by business travelers.

The hikes mark the second round of fare increases in just over a month.

American Airlines rose 6.4%, Delta gained 1.9% and Southwest rose 3.0%.

Health care stocks, consumer staples and utilities lagged the market.

© The Associated Press. All rights reserved.