U.S. stocks were mostly flat on Wednesday, on a volatile last day of a strong third quarter, as a disappointing report on Midwest business activity was offset by gains in commodities and tech.

The Institute for Supply Management-Chicago's business barometer unexpectedly fell to 46.1 in September, a level that indicates a contraction in the regional economy.

The Chicago PMI's September level was below the consensus estimate for a reading of 52 and down from 50 in August.

While the markets initially fell on the PMI report, they later recovered ground, led by tech stocks, including Cisco Systems , which gained 1.9 percent to $23.75.

It's end-of-the-quarter rebalancing, said Keith Springer, president of Capital Financial Advisory Service in San Francisco. We saw some sell-off in the morning and now fund managers are buying into sectors that outperformed in the quarter, and that includes tech and financials, especially.

The Dow Jones industrial average <.DJI> rose 8.09 points, or 0.08 percent, to 9,750.29. But the Standard & Poor's 500 Index <.SPX> inched down just 0.17 of a point, or 0.02 percent to 1,060.44. The Nasdaq Composite Index <.IXIC> gained 6.58 points, or 0.31 percent, to 2,130.62.

Commodities were also strong performers. November crude futures surged 4.6 percent to $69.79 per barrel after a government report showed an unexpected and large slide in gasoline inventories that helped boost RBOB gasoline futures.

Holly Corp gained 3.7 percent to $26.07 while Freeport McMoRan Copper & Gold added 1.8 percent to $69.54 on rising gold prices.

Late Tuesday, Darden Restaurants warned that its full-year same-store sales could fall more than expected, sending it stock down 6.8 percent to $33.71.

In other data on Wednesday, the ADP National Employment Report showed that private-sector job cuts were greater than expected in September, while the U.S. Commerce Department's final reading on gross domestic product for the second quarter showed GDP fell at a 0.7 percent annual rate, narrower than the 1.2 percent expectation.

The S&P 500 is up 15.3 percent for the third quarter, which ends Wednesday. For 2009, the S&P is up 17.5 percent and from a 12-year closing low in early March, it's up about 57 percent.

(Additional reporting by Angela Moon; Editing by Jan Paschal)