Iran warned U.S. President Donald Trump against being dragged into all-out war in the Middle East after the attack on Saudi oil facilities, which Washington and Riyadh blame on Tehran.

The attack knocked out about half of Saudi crude production and severely limited the country's spare capacity, a cushion for global oil markets if an outage occurs.

"Global available spare capacity is extremely low at present following the weekend attacks, leaving little room for additional outages, which tends to be price supportive," UBS oil analyst Giovanni Staunovo said.

Brent crude futures, the global benchmark, gained 95 cents to $64.55 a barrel, while U.S. West Texas Intermediate crude rose 31 cents at $58.42 a barrel.

European banking shares <.SX7P> rose 1.8% and the Swiss franc was poised for its biggest gain in a month after the Swiss National Bank declined to match the European Central Bank and the Fed in easing monetary policy.

The pan-regional FTSEurofirst 300 <.FTEU3> of leading European shares closed up 0.64%, while MSCI's gauge of stocks across the globe <.MIWD00000PUS> gained 0.35%.

Gains in Microsoft Corp shares pushed the S&P 500, the U.S. equity benchmark, within 10 points of its record high while a rally in bank stocks lifted European shares after the Fed set a higher bar for further rate reductions on Wednesday.

Microsoft, the biggest U.S. stock by market cap, valued at $1.08 trillion, hit $142.37 and was trading about 2% higher on the day. The S&P 500 traded just below its record of 3027.98 set in July.

The Dow Jones Industrial Average rose 107.61 points, or 0.4%, to 27,254.69. The S&P 500 gained 13.75 points, or 0.46%, to 3,020.48 and the Nasdaq Composite added 53.26 points, or 0.65%, to 8,230.65.

The U.S. dollar fell against the euro, the Swiss franc and the Japanese yen after the Fed cut rates by 25 basis points on Wednesday to provide insurance against the risk of weaker global growth and resurgent U.S-China trade tensions.

The dollar index <.DXY> fell 0.19% and the euro rose 0.15% to $1.1045. The Japanese yen strengthened 0.42% versus the greenback at 108.02 per dollar.

U.S. Treasury yields fell after division appeared among policymakers on whether the Fed would cut rates further and as pressures in the short-term funding markets eased.

Benchmark 10-year notes slipped 1/32 in price to lift their yield to 1.7857%.

(Reporting by Herbert Lash; Editing by Lisa Shumaker)

By Herbert Lash