Investors pulled an estimated $21.7 billion from actively managed funds that buy U.S. stocks in June, the biggest monthly withdrawal since October 2008, Morningstar Inc. reported Monday. 

For the month, actively run funds of all types suffered redemptions of $30.2 billion while mutual funds and exchange-traded funds that mimic indexes attracted $29.2 billion.

Actively run municipal bond funds attracted $6.3 billion, the only category among stock and bond pickers that managed inflows. 

Top executives in the asset management business, including Larry Fink, chief executive officer at BlackRock Inc., and Gregory Johnson, head of Franklin Resources Inc., have warned that the shift into passive vehicles will continue, threatening the profit margins and future of many investment companies. Fink and others have predicted that the industry will be forced to consolidate to cope with the threat.

BlackRock and Vanguard are the two leaders in funds that mimic indexes. BlackRock’s iShares unit, which sells ETFs, gained $9.1 billion during the month, while Vanguard won $20.1 billion, the data show.