NEW YORK (CNNMoney) -- After tanking earlier in the session, U.S. stocks recovered nearly all their losses in the last hour of trading Thursday, when reports said Greece had reached an agreement on austerity measures with the European Union and the IMF.
"[The news] was perceived as very positive and without confirming anything, the market rallied 100 points on the news," said Jason Weisberg, senior vice president at Seaport Securities.
Citing unnamed sources, Reuters reported that Greece agreed to a new five-year austerity plan with new tax hikes and spending cuts. That news immediately calmed some jitters about Europe's debt crisis, and helped U.S. stocks regain some lost ground.
At the closing bell, the Dow Jones industrial average () was down only 59 points, or 0.5%, compared to much steeper losses of as much as 234 points earlier in the session.
The S&P 500 () lost 3 points, or 0.3%. The Nasdaq Composite ( ) added 17 points, or 0.7%.
The Federal Reserve's dim economic outlook put investors in a funk from the get-go Thursday morning. A weak initial claims report only exacerbated those jitters.
Later, an announcement that the government plans to tap into the Strategic Petroleum Reserve pummeled oil prices and the entire energy sector. The International Energy Agency said its 28 members would release 60 million barrels of oil, half of which will come from the SPR.
Crude oil for August delivery plunged 4.6%, settling at a four-month low of $91.02 a barrel.
Amid oil's plunge, Wall Street's fear gauge, the VIX (), spiked as much as 15% Thursday morning, before calming slightly in the afternoon.
That was far weaker than the 413,000 claims economists had expected and marked the 11th straight week that claims have been above 400,000.
Later in the morning, a report from the Census Department showed sales of new homes fell 2.1% in May, after rising for two months in a row, as the housing market continues to struggle.
Companies: Shares of Red Hat ( ) added 3.5%, after the open source/cloud computing company reported better-than-expected first-quarter results and hiked its full-year forecast late Wednesday.
Pfizer (Fortune 500) and Bristol Myers Squibb ( , Fortune 500) released positive results from trials of its blood thinner, Eliquis, late Wednesday. Shares of Pfizer rose 1.8%, while shares of Bristol Myers Squibb climbed 5.7%.,
Homebuilder Lennar () released earnings results before the opening bell Thursday, posting a 65% drop in quarterly profit. But because that was better than investors had expected, shares rose 2.3%.
After the market close, software maker Oracle (Fortune 500) beat analysts' estimates with earnings per share of 75 cents. But Oracle stock fell 5% in afterhours trading.,
H&R Block () also beat the Street's estimates with fourth quarter adjusted earnings per share of $2.20, although the tax preparation company announced it took a one-time charge of six cents per share related to legal fees.
Gold futures for August delivery fell $32.90, or 2.1%, to $1,520.50 an ounce. And silver prices sank 4.7% to $35 an ounce. Copper prices slid 1.2% and natural gas prices dropped 2%.
World markets: European stocks closed lower. Britain's FTSE 100 slipped 1.7%, the DAX in Germany tumbled 1.8% and France's CAC 40 dropped 2.3%.
In Asia, the Shanghai Composite ended up 1.5%, the Hang Seng in Hong Kong slid 0.5% and Japan's Nikkei lost 0.3%.
Bonds: The price on the benchmark 10-year U.S. Treasury rose, pushing the yield down to 2.91% from 2.99% late Wednesday.
|What we want Apple to unveil at WWDC|
|Millennials squeezed out of buying a home|
|7 traits the rich have in common|
|Big Data knows you're sick, tired and depressed|
|Your car is a giant computer - and it can be hacked|
|Overnight Avg Rate||Latest||Change||Last Week|
|30 yr fixed||3.65%||3.75%|
|15 yr fixed||2.76%||2.91%|
|30 yr refi||3.66%||3.79%|
|15 yr refi||2.79%||2.99%|
Today's featured rates: