U.S. stocks were little changed on Wednesday as a disappointing reading of the labor market offset signs of improved Midwest business activity.

Stocks had risen earlier, in part, as investors sought bargains a day after the S&P 500 slumped to an eight-month low.

Energy and industrial shares, among the hardest hit sectors on Tuesday, rose, with manufacturer 3M up 1.2 percent to $79.40 and Chevron 0.6 percent higher to $68.74.

Analysts said the fact the S&P 500 was holding at about 1,040 in the wake of Tuesday's slide was positive.

That 1,040 level is holding, so for the time being everyone is looking at that level. Sometimes you can have a lot of support when a lot of people are looking at a level like that, said Ryan Detrick, senior technical strategist at Schaeffer's Investment Research in Cincinnati, Ohio.

If it breaks, it's clearly bad, but in the meantime, it is holding so it is good in the short term.

The Dow Jones industrial average <.DJI> dropped 11.94 points, or 0.12 percent, to 9,858.36. The Standard & Poor's 500 Index <.SPX> gained 0.16 points, or 0.02 percent, to 1,041.40. The Nasdaq Composite Index <.IXIC> shed 1.23 points, or 0.06 percent, to 2,133.95.

As the second quarter ends, major indexes were on track for their worst quarter in at least five.

For the quarter, the S&P is down 11 percent, the Dow has fallen 9.2 percent and the Nasdaq has lost 11 percent.

Wednesday's data showed Midwest business activity grew slightly more than expected in June, but a report on private-sector employment showed weakness in a part of the economy critical to recovery.

Developments in Europe helped market sentiment. The European Central Bank said European banks needed to borrow less than had been expected, easing concerns about the repayment of large emergency loans.

Helping to boost the energy sector were oil services stocks, including Baker Hughes Inc , up 4 percent to $42.47 and Halliburton Co , up 2.7 percent to $25.15.

The PHLX Oil Services Sector index <.OSX> gained 1.9 percent. The index has fallen 18.9 percent for the quarter and 21 percent since the BP Plc oil spill.

If you want to go bottom fishing, you do it in the oil services sector. There is going to be consolidation in that group, said Cliff Draughn, president and chief investment officer at Excelsia Investment Advisors in Savannah, Georgia.

With this moratorium on offshore drilling, they are a dead business.

Shares of Ford Motor Co jumped 4.8 percent to $10.35 after the automaker said it was wiping $4 billion in debt off its balance sheet and also paying $255 million on preferred stock dividends that had been deferred.

Monsanto Co , the world's largest seed producer, reported a 45 percent drop in quarterly net income, saying its Roundup herbicide business continued to struggle. Its shares fell 1.8 percent to $46.48.

(Reporting by Chuck Mikolajczak; Editing by Kenneth Barry)