Stocks tumbled Friday after China announced retaliatory tariffs on $75 billion of U.S. goods, setting off President Donald Trump on a Twitter rant.

Mr. Trump first seemed to invite the Federal Reserve to respond to China, then ordered U.S. companies to "start looking for an alternative to China," including making more products in the U.S.

The Dow dropped more than 620 points, or 2.4%, to close at 25,629. The S&P 500 also fell 2.6%, while the tech-heavy Nasdaq saw the sharpest pullback with a 3% drop.

Get Breaking News Delivered to Your Inbox

Mr. Trump's mandate for U.S. companies to move away from China will be difficult for technology companies, which especially have a lot to lose from a trade war with Beijing. Chipmaker Nvidia dropped 5.3%. Apple's share price fell 4.6%.

In a best case scenario, Apple would be able to move just 5% to 7% of its iPhone production out of China, and it would take at least three years to move one-fifth of its production from its Foxconn plants in the country, according to a report from Wedbush Securities analyst Daniel Ives.

"Trump's comments/tweets around China today, specifically around 'ordering U.S. companies to immediately start looking for an alternative to China,' is a clear shot across the bow at Apple," and U.S. chipmakers that do business in China, Ives wrote.

Mr. Trump on Twitter also lashed out against UPS, Federal Express and Amazon, ordering the three companies to block any deliveries from China of the powerful opioid drug fentanyl. Amazon saw its share price drop 3.1%. UPS fell 3.4% and FedEx dropped 3.9%.

American automakers threatened by an increase in levies from 15% to 25% in the newest round of tariffs also saw their share price drop. Ford dropped 3% and General Motors fell 3.3%.

Other stocks like Hasbro dropped 5.9% after the toymaker announced a deal to buy the parent company of Peppa Pig for $4 billion.

By contrast, bond prices rose sharply. The yield on the 10-year Treasury dropped to 1.53% from 1.61%.

China imposed new tariffs of 5% to 10% on two batches of U.S. goods starting Sept. 1 and Dec. 15. The latest round is in response to Mr. Trump previously imposing 10% duties starting Sept. 1 on the remaining $300 billion of U.S. imports from China. Some duties of popular consumer goods like iPhones were later pushed back to Dec. 15 so as not to hit consumer spending during the holiday shopping season.

Beijing's retaliatory tariffs and Mr. Trump's furious response heightened global trade tensions that Wall Street investors worry will tip the world into a recession. "The move will add to uncertainty and market volatility, which will further pressure the slowing global economy," said Elena Duggar, associate managing editor at Moody's.

The China announcement also reversed gains after a speech from Federal Reserve Chairman Jerome Powell in Jackson Hole, Wyoming, which indicated the Fed would stay the course on monetary policy in the coming weeks.