(Reuters) – U.S. stocks continued their climb on Thursday after two days of declines as energy shares gained on higher oil prices following suspected attacks on two tankers in the Gulf of Oman. FILE PHOTO: Traders work on the floor at the New York Stock Exchange (NYSE) in New York, U.S., May 23, 2019. REUTERS/Brendan McDermidCrude prices rose as much as 4%, a day after hitting five-month lows, as the attacks near Iran and the Strait of Hormuz, through which a fifth of global oil consumption passes, stoked fears of a faceoff between Iran and the United States. The S&P energy index jumped 1.4%, the most among the 11 major S&P sectors. Shares of oil majors Exxon Mobil Corp and Chevron Corp rose 1.2% 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. The biggest boost to the S&P 500 index was the communication services sector, which rose 0.74%. Walt Disney Co shares added 2.14%, the biggest contributor to the sector, after Morgan Stanley raised its forecast for Disney Plus subscriber growth. Wall Street’s main indexes 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. The benchmark S&P 500 index has risen 5% so far in June. U.S. consumer prices data on Wednesday pointed to a moderate rise in inflation, adding to expectations of an interest rate cut as early as July. The Fed policymakers are set to meet on June 18-19 and markets have priced in at least three rate cuts in 2019. But on the trade front, there were doubts about 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. Investors were also cautious on their exposure to stocks as they braced for the upcoming Fed meeting and the G20 summit. “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 11:17 a.m. ET the Dow Jones Industrial Average was up 23.22 points, or 0.09%, at 26,028.05, the S&P 500 was up 4.64 points, or 0.16%, at 2,884.48 and the Nasdaq Composite was up 27.20 points, or 0.35%, at 7,819.92. 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.2% and 1.1%. Twitter Inc shares fell 3.79%, 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.08-to-1 ratio on the NYSE and by a 1.99-to-1 ratio on the Nasdaq. The S&P index recorded 25 new 52-week highs and one new low, while the Nasdaq recorded 40 new highs and 49 new lows. Reporting by Shreyashi Sanyal and Aparajita Saxena in Bengaluru; Editing by Arun KoyyurOur Standards:The Thomson Reuters Trust Principles.