US stocks continued to gain on Thursday after two days of declines, as energy shares turned attractive after oil prices rose sharply on concerns of supply disruption following suspected attacks on two tankers in the Gulf of Oman.
Crude prices rose as much as 4%, a day after hitting five-month lows, after the attacks near Iran and the Strait of Hormuz, through which a fifth of global oil consumption passes.
The S&P energy index jumped 1.18%, the most among the 11 major S&P sectors. Shares of oil majors Exxon Mobil Corp and Chevron Corp rose 1% each.
"Chevron and Exxon Mobil were two of the session's better performers, as the markets continue to digest news of oil tanker blasts in the Gulf of Oman," said Connor Campbell, financial analyst at Spreadex in London.
Offering the biggest boost to the S&P 500 index was the communication services sector, which rose 1%.
Walt Disney Co gained 3.89% and was the biggest contributor to the sector after Morgan Stanley raised its forecast for Disney Plus subscriber growth.
Stocks have had a strong start to the month on hopes the Federal Reserve will act to counter a slowing global economy due to the escalating trade war with China, helping the benchmark S&P 500 index climb 5% so far in June.
However, investors stayed cautious ahead of a meeting of the Federal Reserve policymakers and the G20 summit. Markets are anticipating an interest rate cut after US consumer prices data on Wednesday pointed to a moderate rise in inflation.
The Fed will meet on June 18-19 and markets have priced in at least three rate cuts in 2019.
Meanwhile , on the trade front, there were doubts of any improvement in what President Donald Trump called "testy" trade relations with China in the run up to the G20 summit later in this month.
"The sentiment around trade talks is generally more dire. I think you're going to see the Fed being very tempered on rate cuts and we're going to see these muted gains as we gauge how severe the economic downturn is," said Matt Lloyd, chief investment officer at Advisors Asset Management in Monument, Colorado.
At 12:57 p.m. ET the Dow Jones Industrial Average was up 109.01 points, or 0.42%, at 26,113.84, the S&P 500 was up 12.20 points, or 0.42%, at 2,892.04 and the Nasdaq Composite was up 44.25 points, or 0.57%, at 7,836.97.
Also boosting the indexes were gains in marquee companies Facebook Inc, Apple Inc, Amazon.com Inc, Microsoft Corp and Alphabet Inc, which rose between 0.3% and 1.3%.
Twitter Inc shares fell 4.16%, the most among S&P 500 companies, after brokerage Moffett Nathanson said it expects the social media company's costs to rise and revenue growth to slow.
Advancing issues outnumbered decliners by a 2.67-to-1 ratio on the NYSE and by a 2.41-to-1 ratio on the Nasdaq.The S&P index recorded 27 new 52-week highs and one new low, while the Nasdaq recorded 45 new highs and 54 new lows.