NEW YORK — Stocks jumped Tuesday, one of their best days in an otherwise dreary month, after China appeared poised to rev up its economic growth machine.

Industrial stocks that depend heavily on the Chinese economy, like Caterpillar and Alcoa, rose sharply, bringing the Dow Jones industrial average up 76 points to 12,532 in midday trading. China is the largest market for aluminum, which Alcoa makes, and Caterpillar recently said it is aggressively courting China to sell its construction equipment.

If the Dow finishes higher it will be only its fourth gain this month. The Dow is still down 5 percent for May and is headed for its first monthly loss since September. The increasing likelihood that Greece will drop out of the euro currency and a worsening of Spain’s financial condition have been the main culprits behind the decline.

Facebook plunged 7 percent to just under $30. The stock has been hammered since going public a little more than a week ago at $38. The glitch-plagued IPO has drawn scrutiny from regulators and ire from disgruntled investors who had trouble executing trades.

The Standard & Poor’s 500 index rose 7 points to 1,324 and the Nasdaq composite rose 10 points to 2,847.

U.S. markets were closed Monday for Memorial Day.

American investors were also reacting for the first time to news from Greece Monday that a party in favor of abiding by the terms of the country’s financial rescue could win in national elections next month. That could avoid a catastrophic rift with Greece’s international creditors and keep the struggling country within the euro zone.

“News from China and Greece is alleviating concerns that have been dogging the market for some time,” said Robert Pavlik, chief market strategist at investment advisors Banyan Partners. “While Europe will be in trouble for some time, which will reverberate across global markets, for the time being the pressure has been lifted.”

Investors were also heartened with some positive news from the beleaguered U.S. housing market. The Standard & Poor’s/Case-Shiller report on home prices found that prices increased in 12 of the 20 cities it tracks. The increase in March from the month before was the first in seven months. It was the latest evidence of a slow recovery taking shape in the troubled housing market.

In Europe, concerns that Spain’s ailing banking sector might worsen the European debt crisis sent the Spanish stock market to nine-year lows. Other European markets rose.

Spain’s banks are sitting on huge amounts of soured investments in the country’s imploded real estate market. That has led to the recent nationalization of Bankia, the country’s fourth-largest lender. Bankia revealed last week that it needs far more money in state aid than previously expected, $23.8 billion.

Madrid’s Ibex index fell 2.3 percent. Bankia dropped another 13.6 percent. The yield on the benchmark 10-year government bonds, a key gauge of investor confidence in the country’s ability to avoid bankruptcy, was slightly lower at 6.41 percent. The rate is perilously close to the 7 percent rate, which is widely seen as too high for a country to afford over the long term.

Oil prices were up one percent to $91.81. Crude has dropped from $106 four weeks ago amid signs of slowing global growth and optimism that a military conflict over Iran’s nuclear capabilities could be avoided.

Energy companies were also gaining on expectations that China will need more energy to fuel its growth. Peabody Energy and Chesapeake Energy shot up 5 percent, and Consol Energy gained 4 percent.

Other stocks that were making big moves:

— Interline Brands shot up 40 percent after the maintenance company said it is being acquired by a pair of private equity groups for about $811 million.

— Patriot Coal rose 3 percent after the company said its CEO is leaving the company. Last week Patriot announced that it is working with private equity firm The Blackstone Group after there were concerns that the mining company could run short on cash.

— ConocoPhillips rose 3 percent after a Citi analyst said the company is likely to pay hefty dividends this year thanks to asset sales that generated higher returns than analysts expected.