U.S. stock funds saw a record $23.9 billion withdrawn by investors in the last week, according to new data, as the turmoil in global stock markets saw traders shun equities in favor of perceived safe havens.

Exchange-traded fund (ETF) outflows alone constituted the bulk of withdrawals, at $21 billion, while mutual fund outflows made up $3 billion of withdrawals, according to data from Thomson Reuters' Lipper unit. It also showed that tech stock funds suffered $1.1 billion in outflows in its worst losses since 2016.

Lipper has tracked fund flows since 1992 and says it was the worst outflows on record. "We're seeing a flight to safety here, money leaving equities, a lot of money going to money markets," Pat Keon, senior research analyst for Lipper, told Reuters. Money market funds are hugely popular in the U.S. where they are seen as a safe place to park cash during bouts of volatility. The funds are seen as low-risk vehicles that invest in short-term securities.

Lipper's figures tracked flows up until the week ended February 7, so it's likely that there were larger moves on Thursday as the Dow Jones industrial average plummeted more than 1,000 points and entered a full correction mode.

The money wiped out of mutual funds and ETFs in the last week reveals the staggering losses for U.S.-based equities, but they are losses that the bulk of financial experts say were inevitable given the market's historically high valuations through 2017 and into early 2018. All U.S. indexes enjoyed record highs, but many investors long warned that the markets were overbought and that a correction of at least 10 percent was due.