Stocks opened slightly higher on Tuesday after euro zone finance ministers secured a deal that will enable Greece to avoid a March default.

An agreement on a 130 billion euro ($172.47 billion) bailout was reached after Greece was forced to accept unpopular fiscal measures, and private sector bondholders agreed to steeper losses.

The Dow Jones industrial average <.DJI> was up 24.75 points, or 0.19 percent, at 12,974.62. The Standard & Poor's 500 Index <.SPX> was up 3.52 points, or 0.26 percent, at 1,364.75. The Nasdaq Composite Index <.IXIC> was up 5.21 points, or 0.18 percent, at 2,956.99.

(Reporting By Ryan Vlastelica; editing by Jeffrey Benkoe)