Germany's chancellor Angela Merkel said her country would do whatever it could to help Greece regain investors' confidence. Greece's finance minister also said that country would receive the next round of bailout loans in time to avoid a default. Greece was at risk of running out of money by mid-October if it did not receive the funds.
``Europeans are finally starting to understand that they need to act with some force to get ahead of the European debt crisis,'' said John Briggs, a fixed-income strategist at RBS.
The Dow rose 146.83 points, or 1.3 percent, to close at 11,190.69. It had been up as many as 325 points earlier. The Dow has added 419 points over the last two days, making up more than half of its 737-point plunge last week.
The Standard & Poor's 500 index rose 12.43, or 1.1 percent, to 1,175.38. Materials stocks led the S&P higher. Specialty metals company Allegheny Technologies Inc. rose 7.4 percent, the most in the index.
The Nasdaq composite rose 30.14, or 1.2 percent, to 2,546.83.
The gains were broad. Five stocks rose for every one that fell on the New York Stock Exchange. All 10 company groups that make up the Standard & Poor's 500 index rose. Volume was slightly higher than average at 4.9 billion shares.
Small companies rose more than larger ones, a sign that investors were moving money into riskier investments. The Russell 2000 index, a benchmark for small-cap stocks, rose 2.2 percent.
European markets also closed sharply higher. Germany's DAX rose 5.3 percent, France's CAC-40 5.7 percent. Britain's FTSE 100 rose 4 percent.
The encouraging signs from Europe also sent commodities prices higher. Investors fear that a blowup in Europe's debt crisis could drag down economic growth across the globe. That would reduce demand for raw materials such as crude oil and copper.
Oil soared 5.3 percent, copper 4.8 percent. That helped the stocks of energy producers and mining companies. Freeport-McMoRan Copper & Gold Inc. rose 3.1 percent and Exxon Mobil Corp. rose 1.7 percent. Gold rose 3.6 percent, its first gain in a week.
Analysts cautioned that even a small dose of bad news from Europe or the U.S. economy could push stocks right back down again.
``This is a news, rumor-driven rally,'' said Ryan Detrick, senior technical strategist at Schaeffer's Investment Research in Cincinnati. ``This is still a very, very risky market.''
That was evident late in the day when the Financial Times reported that a split had emerged among European leaders over the bailout terms for Greece's debt. The Dow had been up nearly 300 points shortly before the FT published the report on its website at 2:48 Eastern. Within an hour, those gains faded and the Dow closed up 147 points.
Worries about Europe have weighed on the stock market for months. The S&P 500, a benchmark for many U.S. mutual funds, has fallen 13 percent since July 22, shortly after spiking yields on Italian and Spanish bonds brought fears that the region's debt crisis could spread beyond peripheral countries like Greece and Ireland.
Analysts say more needs to be done to fight Europe's debt crisis. Finance ministers have been pushing to increase the size of Europe's rescue fund. Economists also want the European Central Bank to lower interest rates to help spur the economy.
In the U.S., the threat of another budget crisis was averted late Monday when the Senate passed legislation to avoid a government shutdown.
Home prices rose for a fourth straight month in most major U.S. cities in July. A report on Tuesday also showed that consumer confidence improved slightly in September after plummeting in August.
Walgreen Co. fell 6.3 percent, the most in the S&P, after the drugstore operator said it is ending its relationship with Express Scripts Inc. That deal is worth $5.3 billion per year, but Walgreen said Express Scripts was not paying it enough money to fill prescriptions.
Blackberry maker Research In Motion Ltd. jumped 4.5 percent after rumors spread that billionaire investor Carl Icahn has bought a stake in the company, suggesting that the company could be in play.