NEW YORK (AP) — Investors clamored for Treasurys in 2011, giving the market its best return since 2008, even after the US government lost its sterling AAA credit rating. The turmoil in global markets only seemed to increase demand for Treasurys, which are still seen as the lowest-risk investments anywhere.

Compared to the U.S. stock market, which is ending the year flat, Treasurys soared 9.6 percent for the year, according to a broad market index from Bank of America/Merrill Lynch. That’s the best return since 2008.

Investors flocked to the safety of U.S. Treasurys after being alarmed by worries that the euro, Europe’s shared currency, would collapse because of the enormous debt loads of countries like Greece. 

There are still worries that Greece could default on its debt, which will cause massive losses for large French and German banks that hold Greek bonds. Investors fear that could cause a financial panic to spread around the world.

As the euro zone debt crisis intensified during the year, U.S. debt became the safest place to park cash for large investors.

"The U.S. downgrade was well overshadowed by concerns over euro zone risk," said Kim Rupert, managing director of global fixed income analysis at Action Economics. "After huge fluctuations in gold and other commodities, there aren’t any other areas besides Treasurys to put your money and be assured you’ll get it back."

Recent debt auctions by the U.S. government were met with record demand. That demand increased even more after the value of European government bonds fell, crushing the balance sheets of European banks. Those were lining up with other investors to buy U.S. debt to shore up their balance sheets. 

The intense buying sent the yield on the benchmark 10-year Treasury note down to 1.67 percent in September, the lowest on record. On Friday, the 10-year note fell 15 cents for every $100 traded and closed out the year at 1.88 percent. 

Rupert said that the demand for U.S. Treasurys will likely remain high until Europe makes progress toward resolving its debt problems. 

"There’s a real risk that a country defaults in the first half, which will have a domino effect and Treasury yields will hit fresh all-time lows. But once that catharsis is over, expect large-scale selling," said Rupert.

Both Spain and Italy are scheduled to hold debt auctions in the coming weeks, which will be closely monitored. Both countries have had to pay high yields on new debt they’ve sold. Earlier this week, Italy paid 6.98 percent on a 10-year bond auction, dangerously close to the 7 percent threshold at which Greece and Portugal had to seek bailouts from their creditors. 

The 30-year bond yield finished 2011 at 2.89 percent, after starting the year at 4.5 percent. 

The yield on the two-year note fell to 0.24 percent from 0.27 percent.

The yield on the three-month T-bill was 0.01 percent. Its discount wasn’t available.

Trading was quiet on the last trading day of 2011. Markets will be closed Monday in observance of New Year’s Day, which falls on Sunday.