NEW YORK - Continued worries about Europe's debt crisis overshadowed a small rebound in oil prices and pushed stocks slightly lower Tuesday.

Oil rose nearly $2 to $99.59 a barrel after major banks raised their forecasts for crude prices.

Stocks swung between gains and losses throughout the day, with Chevron Corp. and other energy companies posting the largest gains.

The Dow Jones industrial average rose 25.05 points, or 0.20 percent, to close at 12,356.21. The Standard & Poor's 500 index fell 1.09 points to 1,316.28. The Nasdaq fell 12.74, or 0.46 percent, to 2,746.16.

Stocks had been on a tear for the first four months of the year, lifted by stronger earnings reports, an improving job market, and other signs of economic recovery. But all three major indexes have lost more than 3.5 percent this month, even as earnings remain strong. Widespread optimism has given way to a host of concerns, especially the effect of higher oil prices on consumer spending and the risk that Europe's debt troubles could get worse.

Markets faced more troubling news about Europe on Tuesday, when Greece's main opposition party said it opposed the government's latest attempts to reduce debt. The news further dampened hopes that the country might be able to repair its finances enough to get another loan package from the International Monetary Fund.

The ratings agency Moody's also warned that a restructuring of Greece's debt would be considered a default. That would cause borrowing costs for other debt-strapped European countries to soar.

Uri Landesman, president of the hedge-fund manager Platinum Partners, said a Greek default could start a chain reaction affecting larger countries such as Spain, the fourth-largest economy in Europe.