(Reuters) - Wall Street ended higher on Tuesday as the impact of weekend attacks on Saudi Arabia’s biggest oil refinery faded and investors awaited a widely expected Fed interest rate cut on Wednesday.

Stocks closed firmly in positive territory after being mixed for much of the session. That helped make up for a hit to Wall Street on Monday after attacks wiped out nearly half of Saudi Arabia’s oil production, sending oil prices soaring and fuelling geopolitical tensions.

The S&P 500 is less than 1% short of its record high close on July 26.

Investors were calmed after U.S. President Donald Trump said he did not want war and Saudi Arabia said it would restore its lost output by the end of September.

“People were thinking it would be months until we got that production back on line, and now it seems more like weeks. Putting that production back on line alleviates the risk of a higher disruption,” said Keith Buchanan, a portfolio manager at GLOBALT Investments in Atlanta.

The S&P energy index .SPNY dipped 1.5% after recording its strongest one-day surge since January on Monday. The so-called defensive consumer staples .SPLRCS, utilities .SPLRCU and real estate .SPLRCR posted some of the biggest gains among the 11 major S&P sectors.

Overall, nine sectors rose on Tuesday, with only energy and industrials .SPLRCI ending lower.

Slideshow ( 3 images )

The U.S. Federal Reserve concludes its two-day policy meeting on Wednesday, where the central bank is expected to lower interest rates by a quarter percentage point, the second rate reduction of the year.

Investors will also wait for clues on how far the U.S. monetary policy easing would go, given that Fed policymakers are deeply divided on whether more rate cuts are warranted.

“Its going to be difficult for them to signal an extremely dovish tone, given they are already half divided at this point,” said Chris Zaccarelli, chief investment officer at Independent Advisor Alliance, in Charlotte, North Carolina.

The S&P 500 bank index .SPXBK, which tends to underperform in a lower interest rate environment, fell 0.6%.

Economic reports were upbeat, as U.S. manufacturing output increased more than expected in August, while homebuilders’ optimism crept up in September.

The Dow Jones Industrial Average .DJI edged up 0.12% to end at 27,109.03 points, while the S&P 500 .SPX gained 0.26% to 3,005.61.

Slideshow ( 3 images )

The Nasdaq Composite .IXIC added 0.4% to 8,186.02.

Among stocks, Chipotle Mexican Grill Inc CMG.N jumped 3.2% as it added a new steak dish to its menu in the United States for the first time in three years.

Home Depot Inc HD.N dropped 0.3% after Guggenheim downgraded the home improvement chain's shares to "neutral" from "buy."

Corning Inc GLW.N slumped 6.1% after the Gorilla glass maker cut its current-quarter display volume forecast.

Kraft Heinz Co KHC.O tumbled 4.3% after the packaged food maker's second-largest investor, 3G Capital, sold over 25 million shares in open market at a discount.

Advancing issues outnumbered declining ones on the NYSE by a 1.17-to-1 ratio; on Nasdaq, a 1.18-to-1 ratio favored decliners.

The S&P 500 posted 17 new 52-week highs and 1 new low; the Nasdaq Composite recorded 57 new highs and 29 new lows.

Volume on U.S. exchanges was 6.8 billion shares, about average over the last 20 trading days.