The inflows were the first in three weeks. Funds that specialize in U.S. shares attracted most of the new cash, at $12.6 billion, while funds that specialize in foreign shares attracted $1.6 billion to reverse the prior week's $1.1 billion in outflows.

Exchange-traded fund investors plowed almost $6.7 billion into the SPDR S&P 500 ETF Trust , its biggest week this year and the fifth most in the past three years. Financial Services ETFs had their biggest week in seven years, according to Lipper data.

"I suspect bargain hunters bought up financial services ETFs. With a fall of 2 to 5 percent this week, it certainly wasn't performance chasing," said Jeff Tjornehoj, head of Americas Research at Lipper, a Thomson Reuters company.

The Financial Select Sector SPDR Fund (>> Financial Select Sector SPDR (ETF)) XLF was down 2.3 percent, Tjornehoj added.

Taxable bond funds attracted $3.1 billion, reversing the prior week's outflows of $4.6 billion. Funds that specialize in U.S. Treasuries attracted $1.2 billion to mark their biggest inflows since mid-April.

U.S.-based money market funds attracted $12.2 billion of inflows in the latest week, their biggest since mid-May, Lipper added.

Outside of the United States, Chinese stock funds posted $171 million of outflows, their biggest withdrawals since April 2014, against the backdrop of the 30-percent slump in Chinese shares since mid-June.

The weekly Lipper fund flow data is compiled from reports issued by U.S.-domiciled mutual funds and exchange-traded funds.

(Reporting by Sam Forgione; Editing by James Dalgleish and Jennifer Ablan)

By Sam Forgione