NEW YORK - Encouraging signs out of Europe and a surprisingly strong report on the U.S. housing market drove the Dow Jones industrial average up more than 300 points Tuesday. It was the best day for stocks this month.

The Spanish government pulled off a successful debt auction, and gauges of business and consumer confidence in Germany rose unexpectedly. Both helped ease worries about Europe's debt crisis. The dollar fell against the euro, and U.S. government bond prices dropped as traders shifted money out of the safest assets.

Borrowing costs for the Spanish government plunged at an auction of short-term debt, a sign that investors are becoming more confident in the country's ability to pay.

The Dow gained 337.32 points, or 2.87 percent to close at 12,103.58. It lost 100 points the day before.

Europe's major stock markets also climbed. Germany's DAX soared 3.1 percent. France's CAC-40 jumped 2.7 percent.

The gains held Tuesday afternoon even after the U.S. House of Representatives rejected a plan to extend a cut in Social Security taxes. Unemployment benefits for two million people are also at risk.

A Federal Reserve proposal for stricter rules on larger banks did not knock down JPMorgan Chase & Co., Citigroup Inc., and other big bank stocks. JPMorgan Chase gained 4.92 percent. Citigroup added 4.55 percent.

The Standard & Poor's 500 index gained 35.95 points, or 2.98 percent, to 1,241.30. Only six stocks in the index fell. The Nasdaq composite index rose 80.59, or 3.19 percent, to 2,603.73.

Analysts cautioned that recent big rallies in the stock market have been quick to fade as traders seize the chance to sell stocks and lock in gains.

The Commerce Department said Tuesday that builders broke ground on 685,000 homes last month, a 9.3 percent jump from October. That is the highest level since April 2010. Building permits, a gauge of future construction, increased 5.7 percent, spurred by a jump in apartment permits.

The report drove housing stocks higher. PulteGroup Inc. jumped 10.38 percent. D.R. Horton Inc. rose 5.70 percent.

In other corporate news:

General Mills Inc. dropped nearly 1 percent after reporting that its quarterly profit sank 28 percent. The maker of Cheerios and Yoplait yogurt blamed higher costs for ingredients and packaging for pinching profit margins.

AT&T Inc. rose 1.32 percent after the company abandoned its bid late Monday to acquire the wireless provider T-Mobile USA Inc. Sprint Nextel Corp. gained 9.26 percent. Sprint, the No. 3 wireless carrier, had opposed the deal.

Red Hat Inc. plunged 8.90 percent after the software company forecast revenue that was short of what analysts were expecting. Red Hat provides support to business users for the freely distributed Linux operating system.

Oracle Corp. dropped 8 percent in extended trading after the business-software company's quarterly earnings and sales missed analysts' estimates.