NEW YORK — Stocks dropped sharply in late trading Friday on Wall Street but still managed to end the month higher.
After moving between small losses and gains for most of the day, the stock market started to drift lower in afternoon trading. The sell-off accelerated in the final hour. The Dow Jones industrial average ended the day with its biggest loss in nearly six weeks, falling more than 200 points.
Some traders said the sudden afternoon swoon was due to investors rebalancing their holdings at the end of the month. As stocks fell, bonds rallied. The yield on the 10-year Treasury note, which had risen as high as 2.20 percent during the day, fell back to 2.13 percent in late trading. Yield falls as bond prices rise.
On Friday, there was both encouraging and disappointing news on the economy.
Stock indexes started the day slightly lower after the government reported that Americans cut back on spending. Consumer spending fell 0.2 percent in April, the first decline since last May, the Commerce Department said early Friday.
That news was offset by a report released later showing that a measure of U.S. consumer confidence jumped to the highest level in almost six years in May, lifted by rising home prices and record-high stock prices.
The University of Michigan’s consumer sentiment index rose to 84.5 in May, up from 76.4 in April and the highest since July 2007. Investors are hoping that increasingly confident consumers will step up their spending, which would contribute to U.S. economic growth.
The Dow closed down 208.96 points, or 1.4 percent, to 15,115.57.
It was the biggest loss for the index since April 15, when markets plunged after worries about an economic slowdown in China caused commodity prices to drop sharply.
The Standard & Poor’s 500 index fell 23.67, or 1.4 percent, to 1,630.74. The Nasdaq composite declined 35.38 points, or 1 percent, to 3,455.91.
In government bond trading, the yield on the 10-year Treasury note rose to 2.13 percent from 2.12 percent late Thursday. The yield has risen by half a percentage point since the start of the month and is the highest it’s been since April 2012.
Rates have risen on concern that the Federal Reserve is considering easing back on its purchases of $85 billion in bonds every month.
The sharp rise in Treasury yields could be trouble for the market if it continues unabated, said David Bianco, chief U.S. equity strategist at Deutsche Bank. The yields on Treasury notes are benchmarks for setting interest rates on many kinds of loans to consumers and businesses. If they rise quickly, lending rates would rise too, holding back the economy by discouraging borrowing and spending.
‘‘I'm not bearish, but I'm a little bit cautious,’’ Bianco said.
The Dow ended up 1.9 percent for the month, its sixth straight monthly gain. The S&P 500 index rose by 2.1 percent in May and has gained for seven months straight, the longest winning streak since 2009.
The S&P 500 has only fallen in one month, October, over the last year.
In commodities trading, oil fell $1.64, or 1.8 percent, to $91.97 a barrel, close to its lowest in a month, after OPEC oil ministers said they would keep their output targets steady. Gold fell $19 to $1,393 an ounce, a decline of 1.3 percent.
Among stocks making big moves:
— Lions Gate Entertainment rose 77 cents, or 2.7 percent, to $28.80. The company reported net income that topped Wall Street’s expectations as it benefited from home video sales of the finale to its hit franchise ‘‘Twilight.’’
— Palo Alto Networks fell $5.87, or 11 percent, to $48.52 after the network security company posted a quarterly loss and predicted lower profit and revenue in the current quarter than analysts were expecting.
— OmniVision Technologies, a maker of mobile camera sensors, jumped $2.98, or 19 percent, to $18.47. The company reported that its net income doubled in its fourth fiscal quarter as revenue rose sharply.