A gradual decline in the stock market turned into a rout Friday.

After moving between small losses and gains for most of the day, the stock market plunged in the final hour of trading. The Dow Jones industrial average lost more than 200 points, half of them in the last 15 minutes. It was the worst drop in six weeks.

Some traders said the swoon came as large investors rearranged their holdings to match changes in the widely followed MSCI indexes. Others said rapid-fire automated sell programs kicked in as the decline accelerated, exacerbating the loss.

By late Friday, the market looked like it was “feeding on itself,” said Mark Luschini, chief investment strategist at Janney Montgomery Scott. “Why did we go from trading flat to down 200 points at the close? It suggests to me that it was driven by computer models.”

The market managed to hold on to gains for the month, extending winning streaks for major indexes. The Standard & Poor’s 500-stock index ended May up 2.1 percent, its seventh straight monthly gain, its best run since 2009, but the past two weeks have been choppy. The index has declined on five of the last seven trading days and had its first two-week decline since November.

Traders and investors have started to question whether this year’s record-setting rally has run its course. Concern is building that the Federal Reserve may slow its $85 billion bond-buying program.

MSCI, originally known as Morgan Stanley Capital International, provides a range of global stock indexes that professional investors track to measure their performance. The company reviews its indexes twice a year, adding some stocks and removing others.

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.

The yields on Treasury notes are benchmarks for setting interest rates on many kinds of loans to consumers and businesses. The higher yields are already pushing mortgage rates higher. Mortgage buyer Freddie Mac, based in McLean, reported Thursday that average mortgage rates jumped this week to the highest level in a year.

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 Dow managed its sixth straight month of gains.

The Standard & Poor’s 500 index fell 23.67, or 1.4 percent, to 1630.74. The Nasdaq composite declined 35.39, or 1.01 percent, to 3455.91.