Investors who were nervous about the looming debt ceiling showdown poured $3.5 billion in July into exchange-traded funds that own gold, according to fund tracking website

The biggest gold ETF, the $65 billion SPDR Gold Trust managed by State Street , added $2.9 billion of net inflow, IndexUniverse said in its monthly report. BlackRock's $8 billion iShares Gold Trust took in $632 million.

Only the $85 billion SPDR S&P 500 ETF , which has by far the largest trading volume of any ETF, took in more than the SPDR Gold fund, gaining $3.3 billion in the month.

Overall for July, investors added a net $13.2 billion to exchange-traded funds. All major categories got substantial inflow, including U.S. and international equity, fixed-income and commodities, the website said.

Among fund firms, State Street, the second-largest U.S. ETF manager, took in a net $5.8 billion, the most of any manager. Boston-based State Street surpassed BlackRock , the largest U.S. ETF manager, which took in $1.9 billion.

Invesco's Powershares unit took in $2.2 billion largely on the strength of its Powershares QQQ fund.

Vanguard Group got $1.3 billion during the month.