Stocks extended gains on Wednesday after the Federal Reserve kept interest rates unchanged at historic lows and said the pace of economic contraction appears somewhat slower.

Ending a two-day policy meeting, the central bank said it had decided to hold benchmark overnight rates in the zero to 0.25 percent range they reached in December.

Government data showed gross domestic product dropped at a 6.1 percent annual rate in the first quarter, more than expected. But consumer spending rose and a decline in inventories was deemed good news by strategists as it suggested manufacturers and retailers will have to stock up in merchandise.

The thinking is that no matter what the Fed came out with, the markets would take it as a positive, and the markets are holding right now, said Angel Mata, managing director of listed equity trading at Stifel Nicolaus Capital Markets in Baltimore.

We were expecting to hear that the economy is bottoming.

The Dow Jones industrial average <.DJI> gained 233.69 points, or 2.91 percent, to 8,250.64. The Standard & Poor's 500 Index <.SPX> gained 26.30 points, or 3.08 percent, to 881.46. The Nasdaq Composite Index <.IXIC> gained 52.87 points, or 3.16 percent, to 1,726.68.

(Additional reporting by Ryan Vlastelica)

(Reporting by Chuck Mikolajczak; Editing by Jan Paschal)