Stocks gave up an early gain and closed modestly lower on Wall Street, giving the S&P 500 its first loss in four days.
The pullback came a day after major indexes had notched their latest all-time highs. Investors shifted money away from technology, industrial and financial stocks, among others. Health care stocks and companies that rely on consumer spending rose.
Small-company stocks, which have been the biggest gainers this month, fell more than the rest of the market.