Bombings at three hotels in Jordan erased most of an afternoon rally on Wall Street Wednesday, leaving stocks with only marginal gains.

The day ended with stocks such as Google Inc. and Marvel Entertainment down sharply. Before the bombings, stocks had advanced modestly as investors hoping for a fourth-quarter rally did their best to create one.

Investors had spent the morning worrying about consumer spending after PepsiCo Inc. reduced its year-end forecast and said it would restructure. Traders were already concerned about spending after high-end home builder Toll Brothers Inc. cuts its 2006 forecast Tuesday. A pullback by PepsiCo's much broader customer base is even more worrisome.

The morning's declines triggered short-covering and program buying. Stocks were also boosted by portfolio churn as managers took profits where they could and moved into other equities.

According to preliminary calculations, the Dow Jones industrial average rose 6.49, or 0.06 percent, to 10,546.21.

Broader stock indicators were slightly higher. The Standard & Poor's 500 index rose 2.06, or 0.17 percent, to 1,220.65, and the Nasdaq composite index rose 3.74, or 0.17 percent, to 2,175.81.