Stocks were little changed on Friday as energy shares gained modestly and investors took a breather from the financial crisis in Europe.

Traders also were positioning themselves for options expiration.

Energy shares helped support the Dow and S&P 500, with Exxon Mobil Corp up 1 percent at $63.22. U.S. crude rose slightly to $76.83 a barrel.

BP Plc's New York-traded shares rose 0.3 percent to $31.80 after its chief executive survived a bruising appearance before a U.S. congressional committee and on hopes its $20 billion oil spill compensation and clean-up fund will cap public anger.

A lot of investors did get very bearish here, and that's a good sign that we had some selling. That has probably exhausted itself, so the pressures are ebbing, said Steve Goldman, market strategist, Weeden & Co. in Greenwich, Connecticut.

The S&P 500 is now down about 8 percent since the April 23 closing high for the year but had been down well over 10 percent largely because of worries over sovereign debt problems in Europe.

Traders said more volatility could be seen from the convergence of four key expirations, known as quadruple witching. Stock options expire later Friday, while index futures expired earlier in the session.

The Dow Jones industrial average <.DJI> was up 12.35 points, or 0.12 percent, at 10,446.52. The Standard & Poor's 500 Index <.SPX> was up 0.41 point, or 0.04 percent, at 1,116.45. The Nasdaq Composite Index <.IXIC> was down 2.17 points, or 0.09 percent, at 2,304.99.

The futures and options expirations were going to be driving most of the flows at the moment ... especially given the fact we have a relatively quiet session, with much of Europe paying attention to the World Cup, and the U.S. this morning paying attention, said David Lutz, managing director at Stifel Nicolaus in Baltimore.

Declining shares included Teva's U.S.-listed shares , Bayer said on Thursday Teva's U.S. unit admitted in court that some of the information included on packages of its oral contraceptive, Gianvi, was false and agreed to correct its labeling. Teva fell 1.8 percent to $53.26.

CVS Caremark Corp rose 3 percent to $32.79 and Walgreen Co added 3.6 percent to $30.31 after the companies patched up their fight over reimbursements for drug prescriptions, salvaging a relationship worth billions of dollars.

The S&P 500 has held above its 200-day moving average since Tuesday in a bullish signal but has found resistance near 1,121, a key level that marks the halfway point between the October 2007 historic highs and the lows of March 2009.

(Reporting by Caroline Valetkevitch; Additional reporting by Rodrigo Campos; Editing by Kenneth Barry)