Chinese funds just experienced the biggest exodus of money ever.

Investors abruptly pulled out nearly $7 billion from Chinese funds and ETFs over the past week, according to financial data firm EPFR.

The withdrawal comes after index provider MSCI surprised investors by announcing that it wouldn't include shares traded in Shanghai and Shenzhen in its widely-tracked global benchmarks due to concerns over China's market restrictions.

MSCI benchmarks help investors access a wide variety of global markets and direct billions of dollars into stock exchanges when they get the official nod of approval.

When MSCI didn't grant its coveted approval on Wednesday, investors fled, causing the largest pull out ever in a one-week period.

Related: China stocks are still not ready for primetime

Foreign investment is still largely restricted in China, and institutional investors can only buy into the domestic stock market once licensed and approved, and are assigned specific investment quota.

Many outside investors try to access Chinese markets by investing in exchange-traded funds (ETFs), which track the performance of the wider market.

China has been working to open up its markets, introducing a pilot program last year that connects the Hong Kong and Shanghai stock exchanges to allow for cross-border trading. But critics say it's still not enough.

Related: Chinese stocks have surged by over 100%

In total, EPFR data shows investors withdrew nearly $9.3 billion from emerging market funds in the past week, which ran from June 4 to June 10. That's the most money to flow out of emerging markets since January 2008.

The vast majority of the money was withdrawn from Chinese ETFs.

"I wouldn't say investors are turning cold on emerging markets. This is a one-off China event," explained Ian Wilson, managing director of fund data at EPFR.

Related: Chinese billionaire cracked joke as his stock crashed

Stock markets in mainland China have posted some remarkable performance over the past few months as domestic investors bid shares higher.

The China Shenzhen A Share index has shot up by 122% since the start of the year, making it the best performing stock market in the world

The Shanghai Composite has gained 60% over the same period.