Stocks opened higher on Wednesday after Greece's parliament passed an unpopular austerity plan critical to avoiding a debt default.

The Dow Jones industrial average <.DJI> was up 39.47 points, or 0.32 percent, at 12,228.16. The Standard & Poor's 500 Index <.SPX> was up 6.15 points, or 0.47 percent, at 1,302.82. The Nasdaq Composite Index <.IXIC> was up 5.85 points, or 0.21 percent, at 2,735.16.

The parliament approved a five-year austerity plan, suggesting Greek Prime Minister George Papandreou was on track to win backing for a second law on Thursday.

(Reporting by Angela Moon)