NEW YORK —The stock market sputtered to an indecisive close Thursday, taking a pause after three straight days of losses.

Small company stocks, which have slumped 10 percent from their early July peak into what’s known as a “correction,” recovered the most.

Thursday’s pause followed what has been a tough spell for the market, including the Dow Jones industrial average’s 238-point drop Wednesday and a weak September. The buying may have reflected people stepping into the market to take advantage of the recent declines, a trend of “buying on the dip” that has kept the market rising all year despite various geopolitical shocks and worries about Europe’s flagging economy.

Stocks had been sharply lower most of the day, only to recover in the last couple of hours of trading. The Dow had been down as much as 130 points.

“People have been waiting a long time to get back in, and I think (the declines in September) created an entry point for the cash on the sidelines to start buying again,” said Aaron Jett, an equity strategist at Bel-Air Investment Advisors, which focuses on investing for high net-worth individuals.

The Standard & Poor’s 500 index was effectively unchanged on the day, rising one one-hundredth of a point to close at 1,946.17. Technically, the S&P 500’s ever-so-slight gain let it avoid a fourth straight day of declines, which would have been the first time that has happened since December 2013.

The Dow fell 3.66 points, or 0.02 percent, to 16,801.05 and the Nasdaq composite rose 8.11 points, or 0.2 percent, to 4,430.19.

The Russell 2000 index, which tracks small-company stocks, gained 1 percent, far more than the S&P 500 and the Dow. The Russell entered into what’s known as a “correction” on Wednesday, which is when a stock index falls 10 percent or more from a recent high.

Airline stocks also made a modest recovery after sliding Wednesday. United Continental rose 66 cents, or 1.5 percent, to $46.13, Delta Air Lines was up 38 cents, or 1 percent, to $35.28 and Jet Blue rose 34 cents, or 3 percent, to $10.59. The airlines got beaten down Wednesday on fears that news of the first diagnosed case of Ebola in the U.S. might curtail demand for travel.