(Reuters) - A Wall Street rally collapsed and stocks turned negative shortly before the market close on Wednesday after investors reassessed the Federal Reserve’s policy statement and reduced their risk as they weighed how long the U.S. central bank would continue to raise interest rates.

U.S. stocks initially extended gains after the Fed, as expected, raised interest rates and left its monetary policy outlook for the coming years largely unchanged amid steady economic growth and a strong job market.

But the market reversed course as investors weighed to what degree the elimination of the word “accommodative” from the Fed’s policy statement suggested that the end of a cycle of interest-rate hikes might be in sight.

The Fed lifted its benchmark overnight lending rate by a quarter of a percentage point to a range of 2.00 percent to 2.25 percent.

“People misinterpreted the removal of ‘accommodative’ in the statement,” said Mike O’Rourke, chief market strategist at JonesTrading. “People realized that monetary policy remains on course and there are expectations of another rate hike this year, and they unwound purchases they made on the release of the statement, and also additional de-risking going into the close.”

The S&P 500 financial index .SPSY fell 1.27 percent, leading declines.

The S&P 500 utilities index .SPLRCU and real estate index .SPLRCR, which are sensitive to interest rates because their components are often favored for their dividend yields, each fell over 1 percent.

The Fed still foresees another rate hike in December, three more next year, and one increase in 2020.

Fed Chairman Jerome Powell said after the policy meeting that the U.S. central bank is closely monitoring inflation, underscoring concerns the U.S. economy’s rapid growth could lead to overheating and force the Fed to raise rates further.

Traders work on the floor of the New York Stock Exchange (NYSE) in New York, U.S., September 20, 2018. REUTERS/Brendan McDermid

Referring to the removal of the word “accommodative,” Powell said, “This change does not signal any change in the likely path of policy. Instead, it is a sign that policy is proceeding in line with our expectations.”

The stock market has enjoyed a boom period and is at record levels. But as rates rise, equities face rising competition for investors’ funds not only from bonds, but also from cash, which is now the most attractive it has been in about a decade.

The Dow Jones Industrial Average .DJI ended down 0.4 percent at 26,385.28 points, while the S&P 500 .SPX lost 0.33 percent to 2,905.97. During the session, the S&P 500 traded up as much as 0.53 percent.

The Nasdaq Composite .IXIC dropped 0.21 percent to 7,990.37.

The S&P 500 health index .SPXHC rose 0.20 percent, led by biotechs, while the newly formed communication services index .SPLRCL rose 0.35 percent, boosted by Facebook FB.O, which gained 1.24 percent.

Twenty-First Century Fox FOXA.O rose 1.02 percent after agreeing to sell its stake in Sky SKYB.L to Comcast CMCSA.O, which dipped 0.08 percent. Walt Disney Co DIS.N, which is buying Fox, jumped 1.39 percent.

Nike NKE.N fell 1.3 percent as the sportswear maker stuck to its full-year forecast even after sales got a boost from a controversial ad campaign featuring former NFL player Colin Kaepernick.

Declining issues outnumbered advancing ones on the NYSE by a 1.60-to-1 ratio; on Nasdaq, a 1.70-to-1 ratio favored decliners.

The S&P 500 posted 31 new 52-week highs and 12 new lows; the Nasdaq Composite recorded 66 new highs and 73 new lows.

Volume on U.S. exchanges was 7.0 billion shares, compared to a 6.7 billion average over the last 20 trading days.