Wall Street woke in a dismal mood again on Wednesday, greeted by more news of grisly violence in Iraq. Stock selling began at the opening bell and picked up speed as oil prices headed higher and the threat of rising interest rates and inflation continued to loom.

Then something happened.

Just before 2 p.m., with the Dow Jones industrial average and the Standard & Poor's 500-stock index each down by about 2 percent and the Nasdaq composite index off nearly 3 percent, the selling stopped. Buyers emerged. The market staged a brisk rally that left the Dow and the S&P in the black for the day and the Nasdaq just barely in the red.

The Dow closed up 25.69, or 0.3 percent, at 10,045.16. The S&P 500 ended the day at 1097.28, up 1.83, or 0.2 percent. The Nasdaq fell 5.76, or 0.3 percent, to close at 1925.59.

Traders, money managers and economists said the rapid reversal might have marked a key turning point: the moment when investors decided the selling had gone too far, that oil prices are not terribly high by historic standards, that a slight increase in rates will not spell disaster, and that corporate bottom lines are healthy enough to lead the next leg of the economic recovery. Such turning points are notoriously hard to pin down, except in retrospect, but several market watchers said there were reasons why investors might begin to react more positively.

"The ominous talk about rising interest being the end of the world is way overplayed," said Jonathan Golub, equity strategist at J.P. Morgan Fleming Asset Management. "The concern that oil is going to be close to these levels for a sustained period of time is way overplayed. . . . Corporate earnings are better than they have ever been. This market is going to do fine once it gets over being spooked by the prospect of higher rates."

Golub warned however that while the long-term outlook appears positive, oil prices, negative war news and interest rate fears could still cause sharp declines and significant volatility in the market in the near term. And some analysts said that the market's recovery was simply a short-term reaction to a few days of heavy selling.

The stock market has been in general decline since late last week when a strong jobs report stoked fear the Federal Reserve would move faster and more aggressively than anticipated to raise interest rates to prevent the economy from overheating.

Rising rates cut into corporate bottom lines and make stock prices look more expensive when compared with earnings. They also could discourage consumers who have driven the economic recovery with heavy spending supported by cheap debt.

But several economists said that the Fed had done a decent job warning the market about its intentions and that the central bank will probably raise rates slowly enough to avoid major shocks to the economy.

Corporations, meanwhile, are sitting on record amounts of free cash, meaning business spending could rise and hiring could continue to expand, helping prop up consumer spending.

According to an analysis by J.P. Morgan Fleming Asset Management, U.S. corporations have the largest pool of free cash relative to output in the five decades such figures have been tabulated. That surplus, according to the firm, stands in contrast to cash flow deficits and overspending in the 1970s and late 1990s that helped fuel extended bear markets.

"With the jobs data coming in so strong the last two months, we really are at a point where this is a self-sustaining recovery," said William Cheney, chief economist with John Hancock Financial Services Inc. "The virtuous circle is underway."

But Cheney and others warned that external shocks, such as total failure of American efforts in Iraq or a major domestic terror attack, could still derail the recovery and send stock prices lower.

"It's not the cyclical dynamics that are a cause for concern, it's the possibility of a spectacular terrorist event," said Joel Prakken, president of Macroeconomic Advisers. "When someone asks me what that would be, my immediate reaction is a chemical attack at the Mall of America. But maybe we are seeing it every day out of Iraq."

David Memmott, head of listed trading at Morgan Stanley, said much of the selling early in the day on Wednesday was driven by negative headlines coming out of Iraq, notably the brutal slaying of an American citizen by Islamic militants. "What I think really bothered people this morning was the beheading," Memmott said "It was staggering. It really shook my faith."

By 2 p.m., however, Memmott said, investors seemed to decide that the market had hit a sustainable bottom. "People had gotten over-pessimistic and too focused on the negative," instead of focusing on solid corporate earnings and strong underlying fundamentals, he said.

Memmott also said short sellers, professional traders who make bets that the market will drop, began buying shares to lock in gains.

Meanwhile, Cheney of John Hancock Financial Services said that despite scary headlines about record highs, he does not see oil prices as a serious threat to the economy or the market. He said even at $40 a barrel, oil is much cheaper than during the height of the energy crisis of the late 1970s when prices hit around $90 a barrel when counted in 2004 dollars.

"It does suck money out of the economy when oil goes up but not at level that ought to be catastrophic," Cheney said.

Other Indicators

* The New York Stock Exchange composite index rose 10.18, to 6311.14; the American Stock Exchange index fell 4.82, to 1160.18; and the Russell 2000 index of smaller-company stocks rose 0.32, to 548.99.

* Advancing issues narrowly outnumbered declining ones on the NYSE, where trading volume rose to 1.69 billion shares, from 1.53 billion on Tuesday. On the Nasdaq Stock Market, decliners outnumbered advancers by 6 to 5 and volume totaled 1.87 billion, up from 1.62 billion.

* The price of the Treasury's 10-year note fell $4.38 per $1,000 invested, and its yield rose to 4.81 percent, from 4.75 percent on Tuesday.

* The dollar fell against the Japanese yen and the euro. In late New York trading, a dollar bought 113.19 yen, down from 113.25 late Tuesday, and a euro bought $1.1918, up from $1.1864.

* Light, sweet crude oil for June delivery settled at $40.77, up 71 cents, on the New York Mercantile Exchange.

* Gold for current delivery rose to $377.40 a troy ounce, from $376.90 on Tuesday, on the New York Mercantile Exchange's Commodity Exchange.