Encouraging signs from two of the most important zones of the world economy, the powerhouse of China and the debt-burdened countries of Europe, drove the Dow Jones industrial average up 181 points Thursday, its second-biggest gain this year.
China's central bank reported a surprising jump in loans in March. That eased concerns about a sudden slowdown in the Chinese economy, whose growth has helped pull the globe out of recession.
Italy's government easily sold $6.4 billion in bonds to investors. After the auction, borrowing rates for Italy fell, European stock indexes reversed earlier declines and worries about the continental debt crisis eased, at least for the day.
"European governments have a mountain of debt coming due early this year," said John Canally, investment strategist at LPL Financial in Boston. "Some of what you're seeing today in markets is a bit of relief that they're working through it."
In New York, the Dow Jones industrial average climbed 1.4 percent to close at 12,986.58. It was the Dow's biggest jump since March 13 and put the average within sight of clearing 13,000 again.
After the market closed, Google reported earnings that were ahead of analysts' estimates and said it would issue a new class of non-voting stock to shareholders. Google rose 0.5 percent in aftermarket trading.
On Wednesday the stock market snapped out of a five-day slump, its longest and deepest of the year. Investors were worried about European debt, slower job growth and the Federal Reserve's resistance to taking further steps to boost the economy.
"I think the fear was overdone," said Scott Brown, chief economist at Raymond James. "This is the manic nature of the stock market. The sentiment seems to shift back and forth day by day. Either the economy is booming or it's completely falling apart."
In other trading, the Standard & Poor's 500 index rose 18.86 points, 1.4 percent, to 1,387.57. The Nasdaq composite index gained 39.09 points, 1.3 percent, to 3,055.55.
Materials companies led the S&P 500 higher, with energy and industrial stocks close behind. Hewlett-Packard gained 7.2 percent, the best in the Dow, after a study reported that shipments of personal computers unexpectedly rose by almost 2 percent at the start of the year.
The U.S. trade deficit shrank in February to $46 billion, a four-month low, as exports hit an all-time high. The shrinking trade deficit raised the possibility that the economy grew faster in the first quarter than previously expected.
U.S. stocks opened higher despite a rise in weekly unemployment claims. The Labor Department reported that applications for unemployment benefits jumped to 380,000 last week, the highest in two months.
To Canally, the stock market's two-day rally looks fragile.
"We're only a few bad earnings reports and a bad government debt auction in Europe from another sharp sell-off," he said.
Among stocks making big moves:
*Avid Technology Inc. plunged 17 percent. The maker of equipment for recording music and video said it expects to post a loss in the first quarter, a result of weaker demand from amateur musicians and DJs.
*McKesson Corp. rose 3.9 percent after reporting that the Department of Veteran Affairs agreed to keep McKesson as its main drug supplier. The VA runs one of the country's largest health care systems.