The S&P 500 jumped more than 4 percent on Monday, racking up its best opening on record, as an agreement on a $1 trillion emergency rescue package quelled fears that Greece's debt crisis would spread.

The package of standby funds and loan guarantees would be available to euro zone governments shut out of credit markets.

The total bailout, reached by European leaders on Monday, is on the scale of the U.S. government's $700 billion Troubled Asset Relief Program in 2008 to stave off the credit crisis.

It's certainly been well received, said Richard Sparks, senior equities analyst at Schaeffer's Investment Research in Cincinnati, Ohio.

Analysts cautioned, however, that longer-term concerns remained about whether euro-zone nations saddled with high debt loads would be able to manage their balance sheets.

It will remain to be seen if some of these countries can get their affairs in order with the help of this bailout, said Sparks.

Even so, investors welcomed the news, following sustained fears that Greece's debt crisis could infect other weak countries and last week's intraday U.S. stock market plunge. Financial shares were among the biggest gainers, with the S&P financial index <.GSPF> up 4.7 percent.

The Dow Jones industrial average <.DJI> jumped 376.97 points, or 3.63 percent, to 10,757.40. The Standard & Poor's 500 Index <.SPX> gained 44.23 points, or 3.98 percent, to 1,155.11. The Nasdaq Composite Index <.IXIC> shot up 97.27 points, or 4.29 percent, at 2,362.91.

Howard Silverblatt, an analyst at Standard & Poor's, said that based on their records dating back to the late 1960s, the S&P 500's percentage and point gains at the opening were both records.

In stock news, Boeing Co advanced 6.7 percent to $71.19, boosting the industrial sector after Goldman Sachs raised the stock to buy from neutral. A Boeing official said the planemaker is on track to deliver its first 787 Dreamliner.

(Additional reporting by Caroline Valetkevitch; editing by Jeffrey Benkoe)