U.S. stocks rose last week, driving the Standard & Poor’s 500 index up from the threshold of a bear market, amid optimism that European leaders will tame the region’s debt crisis and after American economic data improved.

Equities fell Friday after Fitch Ratings cut the debt ratings of Spain and Italy, overshadowing faster-than-estimated U.S. job growth. Raw-material producers in the S&P 500 surged 6.2 percent last week, the most among 10 groups, as energy stocks and companies reliant on discretionary consumer spending climbed more than 3.4 percent.

Hewlett-Packard Co. and Cisco Systems Inc. jumped at least 7.4 percent, leading gains in the Dow Jones industrial average.

The S&P 500 advanced 2.1 percent to 1,155.46, breaking a two-week losing streak. It surged 6 percent Tuesday through Thursday, the biggest three-day rally since August. The Dow rose 189.74 points, or 1.7 percent, to 11,103.12 last week.

Stocks rebounded as European Central Bank President Jean-Claude Trichet announced a bond-purchase program to tackle the debt crisis, and European Commissioner Olli Rehn said there is an “increasingly shared view” that the region needs a coordinated approach.

The S&P 500 closed under 1,100 Monday for the first time in more than a year, leaving the gauge within 1 percent of a 20 percent decline since April.

The Treasury will sell $29 billion in three-month bills and $27 billion in six-month bills on Tuesday. They yielded 0.025 percent and 0.035 percent, respectively, in when-issued trading.

— Bloomberg News