Stocks halted their recent slide on Wednesday as buyers returned despite a downbeat inflation report.
The Dow Jones industrial average climbed 110 points, its best gain since May 5.
It was the bond market's turn to get hit: Treasury yields jumped on the inflation news, sending the two-year T-note yield to its highest level since late 2000.
Stocks gained momentum in late-afternoon trading after a largely lackluster session marked by mixed reactions to the Labor Department's consumer price index, which showed a larger-than-expected 0.3% rise in so-called core prices in May.
"The rumor was that core inflation numbers would be bad and they were," said Hugh Johnson, chief investment officer of Johnson Illington Advisors. "The markets already fully reflected that fact."
Stocks have been pummeled since mid-May on fears that rising inflation will compel the Federal Reserve to continue tightening credit, threatening the economic expansion.
The Dow had lost 541 points over the previous seven sessions alone, and on Tuesday fell into negative territory for the year. It climbed 0.9% into the black Wednesday with a 110.78-point, 1% advance to 10,816.92.
"Today is a reversal day," said John C. Forelli, portfolio manager at Independence Investment in Boston.
Broader stock indexes also rallied, but not as much. The Standard & Poor's 500 rose 6.35 points, or 0.5%, to 1,230.04; the technology-heavy Nasdaq composite climbed 13.53 points, or 0.6%, to 2,086.00.
The Russell 2,000 small-stock index added 0.6% to 677.09, after seven consecutive declines.
But winners only narrowly outnumbered losers on the New York Stock Exchange and on Nasdaq. Trading remained heavy, which analysts said in part reflected this week's quarterly expiration of key stock index options and futures contracts.
Foreign stock markets, many of which have suffered much heavier losses than U.S. shares in recent weeks, found some footing on Wednesday.
Japan's Nikkei-225 index rose 0.6% to 14,309.56 after diving 4.1% on Tuesday, its biggest loss in two years. Russia's RTS index rebounded 3.2% after a 9.4% slide on Tuesday.
The Mexican market rose 0.9%. Most European markets were little changed.
Commodity prices also stabilized after plummeting Tuesday on concerns about the economy. Near-term gold futures in New York eased 20 cents to $562.30 an ounce after diving $44.30 in the previous session.
Crude oil futures rose 58 cents a barrel to $69.14 in New York.
It was a different story in the bond market. Spooked by the inflation report, investors drove bond prices down and yields up. The 10-year T-note yield surged to 5.06% from 4.97% on Tuesday.
The two-year T-note ended at 5.11%, up from 5.01%.
Analysts said some of the bond market sell-off was attributed to investors cashing out of bonds to buy stocks. The reverse of that trade had been helping bonds in recent days, as investors sold stocks to buy bonds.
In other market highlights:
* The Dow got a lift from Boeing, which surged $5.03 to $82.01 after winning a big order from Singapore Airlines.
* Intel jumped 61 cents to $17.73. The computer chip maker was raised to "outperform" from "in-line" by Goldman Sachs analyst James Covello, who said Intel's second-quarter gross margin probably would fall to the lowest point since the last nadir of the chip demand cycle in 2002, making it the right time to buy ahead of a turnaround. Gross margin is the percentage of sales a company earns minus production costs.
Intel shares are down 29% this year, for the worst performance in the Dow index.
A measure of chip and chip-equipment stocks rallied 1.3% Wednesday.
* A gauge of oil and gas producers jumped 2.4%, helping to support the market, as crude prices rose. Exxon Mobil gained $1.15 to $57.80. Chevron added $1.05 to $57.83.
* On the downside, gauges of banks, utilities and real estate investment trusts fell, as these groups tend to be the most sensitive to changes in interest rates. Bank of America retreated 43 cents to $46.64. Exelon, the biggest U.S. utility owner by market value, sank $1.07 to $57.24.
* Apple Computer fell 72 cents to $57.61, bringing its decline for the year to 20%. Creative Technology, which makes Zen digital music players, said the U.S. International Trade Commission would investigate its complaint that Apple, maker of the iPod, infringed its patent.
* Stun-gun maker Taser International rose 55 cents to $8.02 after Chairman Phillips W. Smith bought $762,000 worth of stock. Taser has fallen nearly 18% since Monday, when it announced it had filed a patent infringement lawsuit against Bestex, a maker of air guns that fire darts to shock humans.