NEW YORK (AP) -- The stock market finally got the deal it wanted from Greece, but the excitement didn't last long.
U.S. stocks rose early Thursday after Greece announced an agreement to cut costs and keep from defaulting on its debt next month, an event that could have shocked the world financial system.
But stocks dropped back and were mostly flat at midday. Analysts said the market had expected the deal and warned that Europe still faced problems.
The Dow Jones industrial average pushed to within 75 points of 13,000, a milestone it hasn't reached in almost four years. It had given up some of those gains by shortly after noon, when it was up 23 points to 12,907.
The Standard & Poor's 500 index briefly rose four points to 1,353, double its lowest close during the Great Recession. At midday it was just shy of that landmark, at 1,352. The Nasdaq composite index was up nine points to 2,925.
Jeremy Zirin, chief equity strategist at UBS Wealth Management, said that the markets had already assumed Greece would reach a deal to keep from defaulting, which is why stocks didn't skyrocket on the news.
The deal calls for Greece to make steep cuts in government jobs and spending. Greece's so-called troika of lenders -- the European Union, the European Central Bank and the International Monetary Fund -- insisted on the cuts.
The cuts are one condition of a €130 billion bailout for Greece, without which it can't afford €14.5 billion worth of bond payments due March 20.
But the cuts will be hard to implement in a country that has grown used to profligate government spending. Workers are already protesting that job cuts and pay cuts have already been too severe.
The country has missed other targets for reducing its debts. It also still has to persuade private investors to agree to losses on their holdings, which will make them less likely to buy Greek bonds in the future.
And other European countries, notably Portugal and Italy, still have long-term debt that economists warn could be unsustainable.
"We still have a lot of wood to chop," Zirin said.
Nigel Travis, CEO of Dunkin' Brands, said the news out of Greece will be a psychological boost for consumers. And when they feel good about the economy, they're more likely to spend, regardless of whether their wealth is directly affected.
But Travis, whose company runs Dunkin' Donuts and Baskin-Robbins, said Greece wasn't the most pressing problem facing his franchisees. They're more concerned about the U.S. presidential election and getting clarity on changes to government-funded small-business loans and whether a cut in the Social Security payroll tax will be extended.
"I think it's good news," Travis said of the Greece deal. "Whether it actually solves the euro problem, you have to question."
The euro rose half a cent against the dollar to $1.33, its highest level in two months. Bond prices fell slightly. The yield on the U.S. government's benchmark 10-year note rose to 2.05 percent from 1.99 percent Wednesday, then dropped back to 2.03 percent.
The Dow has gained 5 percent in the young year. Its last close above 13,000 was May 19, 2008, four months before the collapse of Lehman Brothers investment bank and the worst of the financial crisis.
Stocks were also helped Thursday by U.S. jobs data. The number of people seeking unemployment assistance fell to its lowest level since April 2008.
The stock of Diamond Foods, maker of Emerald Nuts and Pop Secret popcorn, plunged 35 percent in early trading. The company announced late Wednesday that it was ousting its top two executives amid allegations of improper accounting.
Groupon, the daily deal website, fell 10 percent after it announced a surprising quarterly loss in its first earnings report as a public company.