In the wake of an escalating trade war between the U.S. and China, ETF investors turned risk-off and fled toward the relative safety of fixed-income assets.

In light of the heightened tariff concerns, the deconstruction of global synchronized growth and further interest rate hikes out of the Federal Reserve, fund investors have cut down on stock purchases and headed toward fixed-income instead, Bloomberg reports.

Specifically, bond ETFs attracted $4.6 billion in July, or almost double the total flows into equity ETFs and the most of any asset class. The robust inflows into bond ETFs follows the $7.5 billion added to fixed-income ETFs in June, whereas equity exchange traded products experienced $7.2 billion in outflows.

“When we came into 2018, we started talking about risk management,” Emily Roland, head of capital markets research at John Hancock Investments, told Bloomberg. “Now we’re starting to see that happen more.”

For example, the iShares Core U.S. Treasury Bond ETF (NYSEArca: GOVT) has been among the more popular plays, taking in $828 million in net inflows since mid-June. The Vanguard Short-Term Government Bond ETF (NYSEArca: VGSH) also seen larger than normal inflows over the same period as investors turned to safety and tried to hedge rate risk by shifting toward the shorter end of the yield curve.

Despite the risk-off sentiment, the iShares iBoxx $ High Yield Corporate Bond ETF (NYSEArca: HYG) continued to entice yield hunters as the junk bond ETF experienced seven consecutive days of inflows, bringing in $1.6 billion since the end of June.

Invesco argued that the rising interest for high-yield debt may be due to the fact that this category has historically performed well in past rising rate environments – there have been 17 quarters since 1987 in which yields rose significantly and high yield bonds showed positive returns in 65% of the time. Invesco also offers a smart beta high-yield bond ETF, the PowerShares Fundamental High Yield Corporate Bond ETF (NYSEArca: PHB).

The iShares Core US Aggregate Bond ETF (NYSEArca: AGG), which tracks the investment results found in the Bloomberg Barclays U.S. Aggregate Bond Index, was also a popular play as it saw almost $1 billion in inflows since the second half of June.

For more information on the fixed-income market, visit our bond ETFs category.