Traders work on the floor at the New York Stock Exchange (NYSE) in New York, U.S., May 30, 2019.

Investors really lost faith in stocks last month as trade tensions escalated, fleeing stock exchange-traded funds in record numbers.

Equity ETFs suffered their largest monthly outflow in history last month, bleeding more than $19.9 billion, according to a recent report from State Street Global Advisors. The previous record was a $19.7 billion outflow in January 2014.

The selling in the market last month was first triggered by President Donald Trump's May 5 tweet about slapping a higher tariff on Chinese goods, which started a slew of tit-for-tat threats between the world's two largest economies over trade dispute. The lost more than 6.5% in May amid the heightened trade tenstions, its first negative month of the year.

"Global equities were tweeted into a tailspin," said Matthew Bartolini, head of SPDR Americas research at State Street Global Advisors, in a note. He noted the "Sell in May" seasonal theory may have played a part as well.

Sector ETFs also suffered in May with an outflow of more than $8 billion, the second largest outflows in history, State Street said.

"In May, selling was once again concentrated within the cyclical, economically sensitive segments of the market: Financials, Technology, Industrial Materials and Energy," Bartolini said.

Utilities was the only sector that actually raked in new money as investor rotated to the "bond-proxy, domoestically oriented sector," Bartolini added.

Investors fled to safe-haven government bonds amid the intensifying trade battle in May, but the overall bond flows were capped by the outflows from riskier sectors in the bond market, i.e. higher yield, bank loans and emerging market debt, according to the report.

Treasury ETFs attracted more than $5.6 billion inflows in May, while high-yield bond ETFs lost about $3 billion. The yield on the benchmark 10-year Treasury dipped to its lowest level in 20 months this week.

"Bond flows were positive, but the rotation out of credit sectors dragged the net total 22% below the 3-year monthly average... With the market striking a risk-off tone, bonds were allocated to overall, with less equity-sensitive sectors benefiting," Bartolini said.