Stocks gave up a big rally and took a dive in afternoon trading Wednesday after the Federal Reserve raised interest rates again and said it plans to keep raising them next year. The market finished at its lowest level since September 2017.

On Wednesday:

The S&P 500 index shed 39.20 points, or 1.5 percent, to 2,506.96.

The Dow Jones Industrial Average retreated 351.98 points, or 1.5 percent, to 23,323.66.

The Nasdaq composite skidded 147.08 points, or 2.2 percent, to 6,636.83.

The Russell 2000 index of smaller-company stocks declined 27.95 points, or 2 percent, to 1,349.23.

For the week:

The S&P 500 is down 92.99 points, or 3.6 percent.

The Dow is down 776.85 points, or 3.2 percent.

The Nasdaq is down 273.84 points, or 4 percent.

The Russell 2000 is down 61.58 points, or 4.4 percent.

For the year:

The S&P 500 is down 166.65 points, or 6.2 percent.

The Dow is down 1,395.56 points, or 5.6 percent.

The Nasdaq is down 266.56 points, or 3.9 percent.

The Russell 2000 is down 186.28 points, or 12.1 percent.