U.S. stock markets turned sour late in the trading session Thursday giving up earlier gains that had pushed the S&P 500 toward record territory in the wake of the Federal Reserve rate cut, trade worries and increasingly hostile rhetoric from Iran.

At the close, the S&P closed flat, gaining just 0.06 points to 3,006.79. Earlier in the day it was just 0.4% shy of the July record 3,025.86. The Dow Jones Industrial Average lost 52 points, falling 0.19% while the Nasdaq Composite gained just 0.07%.

Volume on the New York Stock Exchange was 2.6 billion shares with 1,498 issues advancing and 1,444 declining.

Most actives were led by McDermott International Inc. (MDR), Advanced Micro Devices Inc. (AMD) and U.S. Steel (X).

Investors put aside disappointment the Federal Reserve declined to signal any more rate cuts this year after lowering the federal funds rate by 25 basis points Wednesday to the 1.75% to 2% range. President Trump, who had been pushing for drastic action, said the Fed Chairman Jerome Powell has no guts, sense or vision. Powell declined to respond to the president’s comment. He has noted in the past, however, the Fed will not succumb to political pressure but instead base its decisions on economic data.

The National Association of Realtors reported existing-home sales inched up in August, despite tight supplies. The median price rose nearly 5% over last year to $278,200, the 90th straight month of year-over-year gains. Sales were up 1.3% from July as homebuyers grabbed attractive mortgage rates.

“Sales are up, but inventory numbers remain low and are thereby pushing up home prices,” said Lawrence Yun, NAR’s chief economist . “Homebuilders need to ramp up new housing as the failure to increase construction will put home prices in danger of increasing at a faster pace than income.”

The next round of trade negotiations with China are set to begin this month with high-level talks scheduled for early October. The two sides have extended olive branches in recent weeks, but national security issues remain a sticking point.

Iran ramped up rhetoric following the weekend strike on Saudi oil production facilities that wiped out half its daily output. Saudi and U.S. officials have accused Iran of being responsible for the attack despite denials from Tehran. Foreign Minister Mohammad Javad Zarif said in a CNN interview any military action against the Islamic Republic would result in “all-out war.”

The Organization for Economic Cooperation and Development said Thursday the global economy is expected to increase just 2.9% this year, the lowest rate since 2009, and is expected to remain low at least through 2020, depending on what happens between the U.S. and China.

Festering disputes between Japan and South Korea also present a problem as does Trump’s threat to impose tariffs on auto parts in November.

The OECD pegged U.S. growth this year at 2.4%, two ticks higher than what the Federal Reserve is projecting, down from 2.8% in May.

The OECD also warned the United Kingdom leaving the European Union without a trade deal could cut U.K. economic output by 2%, tipping it into recession, and EU output by 0.5%. The U.K. is scheduled to leave the EUOct. 31, and Prime Minister Boris Johnson has said he’s not inclined to delay the exit despite Parliamentary efforts to put the deadline off.

On global markets, Hong Kong’s Heng Seng closed off 1.07% while the Nikkei 225 added 0.38% and China’s Shanghai Composite moved 0.46% higher. Australia’s S&P/ASX was up 0.54%.

London’s FTSE closed 0.58% higher while the German DAX added 0.55% and the French CAC 40 increased 0.68%.

The British pound was up 0.42% against the dollar while the euro added 0.13%. The U.S. dollar index was off 0.22%.

On commodities markets oil moved higher with crude oil futures adding 0.45% and Brent crude up 0.31%. Gold and silver were lower dropping 0.63% and 0.5%, respectively.