U.S. stocks bounced off lows but still ended weaker Wednesday as worries about trade tensions on top of global growth uncertainties spooked Wall Street, fueling buying in government bonds.

The Dow Jones Industrial Average DJIA, +0.19% sank 221.36 points, or 0.9%, to 25,126.41, but had fallen more than 400 points during the session. The S&P 500 index SPX, +0.29% lost 19.37 points, or 0.7%, to 2,783.02 and the Nasdaq Composite Index COMP, +0.36% dropped 60.04 points, or 0.8%, to 7,547.31.

U.S.-China trade tensions continue to weigh on stocks after Chinese state media reports underlined the country’s scope to use rare-earth minerals, used in the production of an array of devices such as mobile phones, computer memory chips and rechargeable batteries, as an economic weapon.

Read:Is threat of withholding rare-earth metals a key weapon in China’s trade war with U.S.?

See:Shares of Chinese Australian rare-earth companies soar amid China threat over exports

An official with China’s National Development and Reform Commission was quoted by state media as saying that “if anyone wants to use imported rare earths against China, the Chinese people won’t agree.” The editor in chief of China’s Global Times newspaper tweeted that the country was considering “restricting rare earth exports” to the U.S.

Also read:U.S. trade war with China may turn rare earth elements into economic pawns

Meanwhile, global bonds continue to rally, pulling down yields. The spread between the 10-year Treasury note TMUBMUSD10Y, 0.674% and the 3-month Treasury bill TMUBMUSD03M, 0.101% moved further into negative territory, dropping to its lowest since 2007. Such inversions of that measure of the yield curve are viewed as reliable recession indicator.

Check out:Here’s why stock-market bulls should fear the slump in Treasury yields

Stocks turned sharply lower before trimming losses when special counsel Robert Mueller made his first public statement on the two-year investigation into Russian interference in the 2016 presidential election that some thought could lead to greater political turmoil.

“If we had confidence that the president had not committed a crime, we would have said so,” he said. Mueller also noted that charging President Donald Trump was “not an option” as he is bound by Justice Department policy that a president cannot be indicted while in office.

What were analysts saying?

A recession is coming, said George Saravelos, global head of FX research at Deutsche Bank. “Stock prices of the semiconductor sector tend to lead the global manufacturing PMI by one to two months and yesterday made a new low,” he said in a note. “This is in line with a recent IMF study we highlighted which points to the global importance of the smartphone cycle. It just so happens that smartphones are at the front line of the U.S.-China trade war.”

The IMF report that Saravelos referred to stated that smartphone sales peaked in 2015.

Read: Apple and 9 other stocks that tend to heat up in the summer

Which stocks were in focus?

Shares of Capri Holdings Ltd. CPRI, -1.84% sank 9.9% after the parent of Michael Kors and Versace said that fiscal fourth-quarter profits fell from the year ago period, while issuing downbeat guidance.

DowDuPont Inc. US:DWDP bounced back from earlier loss to rise 1% after the materials and chemicals company said that it expects to book noncash goodwill impairment charges of $800 million to $1.3 billion, following the 2017 merger of Dow Chemical Co. and E.I. du Pont de Nemours.

Shares of Dick’s Sporting Goods Inc. DKS, -2.97% reversed direction to skid 5.9% after initially rising on better-than-expected first-quarter earnings while raising guidance for the rest of the year.

Abercrombie & Fitch Co. ANF, -0.82% stock tumbled 27% after the apparel retailer reported same-store sales growth that missed expectations, while issuing weak guidance for the second quarter and full-year 2019.

Large-cap tech companies, viewed as among the more vulnerable to the prolonged U.S.-China trade spat, were under pressure. Shares of Apple Inc. AAPL, +1.02% slid 0.5%, shares of Microsoft Corp. MSFT, +1.29% fell 1%, shares of Alphabet Inc. GOOG, +0.92% GOOGL, +0.95% shed 1.7% and shares of Facebook Inc. FB, +0.20% lost 1.2%.

How were other markets trading?

Stock markets in Asia closed mostly lower with Japan’s Nikkei 225 NIK, +0.57% falling 1.2%, Hong Kong’s Hang Seng Index HSI, +0.38% losing 0.6% and China’s Shanghai Composite Index SHCOMP, +0.05% inching 0.2% higher. In Europe, the Stoxx Europe 600 index SXXP, -1.02% decline 1.4%.

Crude oil US:CLN19 trimmed losses after shedding more than 3% and gold prices US:GCM19 settled higher. The U.S. dollar DXY, +0.00% , meanwhile, edged up against its rivals.

—William Watts contributed to this article