(AP) -- A steep slide in technology companies pulled U.S. stocks lower Thursday, erasing gains from the previous day.
Investors also sold big-dividend stocks as bond yields rose. Banks and energy stocks bucked the broader market decline. Crude oil prices closed higher for the sixth straight day.
The shift out of the technology sector came as investors bet central bankers may be ready to lift rates. That spurred many traders to move out of growth sectors, like technology, and into value stocks, such as banks, said Erik Davidson, chief investment officer at Wells Fargo Private Bank.
"It's been a good day for energy and financials and a terrible day in particular for technology," Davidson said. "To the extent that you're going to be looking to put money into financials, into energy, you have to pull it from somewhere, and the sector that has done best so far this year is technology."
The Standard & Poor's 500 index fell 20.99 points, or 0.9 percent, to 2,419.70. The Dow Jones industrial average slid 167.58 points, or 0.8 percent, to 21,287.03. The average was down briefly more than 257 points.
The Nasdaq composite lost 90.06 points, or 1.4 percent, to 6,144.35. The Russell 2000 index of small-company stocks gave up 9.07 points, or 0.6 percent, to 1,416.20.
Bond prices fell. The 10-year Treasury yield rose to 2.27 percent from 2.23 percent late Wednesday.
The stock market was coming off its biggest gain in two months. The market slide came about despite some encouraging news on the U.S. economy.
The Commerce Department said that the nation's gross domestic product, the broadest measure of economic health, increased at an annual rate of 1.4 percent in the first quarter. That's better than the previous estimate of 1.2 percent and double the initial estimate of 0.7 percent. The upgrade reflects new-found strength in consumer spending and exports.
Still, investors appeared more focused on the possibility of higher interest rates following recent remarks from the president of the European Central Bank and the governor of the Bank of England.
"We've had a lot of commentary from central bankers around the world suggesting perhaps that it is within the field of vision that we could see some of the accommodation being removed from the system," said Eric Wiegand, senior portfolio manager for Private Wealth Management at U.S. Bank. "While we don't think that's imminent, it certainly does give investors something to consider."
Semiconductor manufacturers led the technology sector slide.
Advanced Micro Devices fell the most among companies in the S&P 500 index, losing 63 cents, or 4.8 percent, to $12.60. Lam Research gave up $5.48, or 3.7 percent, to $142.35. Alphabet, Google's parent company, also fell, shedding $23.19, or 2.4 percent, to $937.82. Facebook declined $2.20, or 1.4 percent, to $151.04. Apple slid $2.15, or 1.5 percent, to $143.68.
All told, the technology sector fell 1.8 percent. Despite the drop, the sector leads all other sectors this year with a gain of 16.5 percent.
"People are a little bit nervous about the high-flying tech sector," Davidson said. "Valuations are getting pretty stretched, so this is providing some opportunity to redeploy some of those assets into something that may be about to turn, the financials in particular."
Financial sector stocks have been mostly rising this week as investors bet on interest rates climbing further. Banks can make more money on lending when rates move higher.
Bank stocks also got a boost from the Federal Reserve. The central bank said late Wednesday that 34 of the biggest U.S. banks can buy back more stock and raise their dividends because their balance sheets are strong enough to bear a major downturn in the economy.
The Fed's announcement marked the first time that all of the banks passed their so-called stress tests, which were created after the global financial crisis of 2008.
Citigroup gained $1.80, or 2.8 percent, to $66.98, while Regions Financial climbed 57 cents, or 4 percent, to $14.66. Bank of America added 44 cents, or 1.8 percent, to $24.32.
Traders also had their eye on the latest company earnings and deal news.
Acuity Brands jumped 10.5 percent after the lighting company's latest quarterly earnings and sales exceeded Wall Street's expectations. The stock was the biggest gainer in the S&P 500 index, adding $18.79 to $198.52.
Staples rose 1.5 percent after private equity firm Sycamore Partners agreed to buy the office supplies chain for $6.9 billion. Staples gained 15 cents to $10.08.
Rite Aid slumped 26.5 percent after Walgreens Boots Alliance abandoned a bid to buy the rival drugstore chain following resistance from U.S. regulators. Walgreens will now buy more than 2,000 stores, three distribution centers and inventory in a new deal. Rite Aid fell $1.04 to $2.89. Walgreens gained $1.28, or 1.7 percent, to $78.37.
The termination of the Rite Aid buyout canceled a related asset deal involving Fred's Pharmacy. Shares in Fred's slid $2.81, or 22.8 percent, to $9.51.
Oil prices closed higher despite paring some early gains. Benchmark U.S. crude rose 19 cents to settle at $44.93 a barrel in New York. Brent, the international standard, gained 9 cents to close at $47.63 in London.
In other energy futures trading, wholesale gasoline held steady at $1.48 per gallon. Heating oil added 1 cent to $1.45 per gallon. Natural gas slipped 5 cents to $3.04 per 1,000 cubic feet.
Among metals, gold fell $3.30 to settle at $1,245.80 per ounce. Silver slipped 14 cents to $16.65 per ounce. Copper gained 2 cents to $2.70 per pound.
The dollar fell to 112.07 yen from 112.28 yen late Wednesday. The euro strengthened to $1.1432 from $1.1382. The British pound rose to $1.2991 from $1.2929. European currency markets have been volatile in recent days after leading central bankers appeared to hint at a turn in monetary policy soon.
Major stock indexes in Europe also closed lower. Germany's DAX fell 1.8 percent, while the CAC 40 in France slid 1.9 percent. The FTSE 100 index of leading British shares lost 0.5 percent.
In Asia, Japan's benchmark Nikkei 225 index rose 0.5 percent, while South Korea's Kospi gained 0.6 percent. Hong Kong's Hang Seng added 1.1 percent. Australia's S&P/ASX 200 climbed 1.1 percent.