More than $40 billion flowed out of all forms of mutual funds in the week that featured the first-ever downgrade of U.S. debt.

In the week ending August 10, $40.3 billion was pulled out of long-term mutual funds of all types, the Investment Company Institute reported.

No category was untouched.

The biggest outflow was in funds based around the long-term prospects of U.S. stocks. Those accounted for $23.5 billion of the withdrawals.

But foreign stock funds also were hit $6.5 billion, bond funds were down $4.4 billion and hybrid stock-bond funds $5.9 billion.

The $40.3 billion that was pulled out in that week was roughly 25 percent more than was pulled out in the previous four weeks and more than doubled the $17.0 billion pulled out the previous week.

Since May 1, almost $85 billion has now been pulled out of funds that invest long-term in U.S. stocks.