* Files for bankruptcy protection in Dallas
* Carl Icahn had been large investor
* Spain's BBVA bought most of assets

NEW YORK - Guaranty Financial Group Inc (GFGF.PK) has filed for Chapter 11 bankruptcy protection, less than a week after regulators seized its banking unit and sold most of its assets to the Spanish bank, Banco Bilbao Vizcaya Argentaria SA (BBVA.MC).

The Austin, Texas-based company and three affiliates filed for protection from creditors on Thursday with the U.S. bankruptcy court in Dallas.

Guaranty said it had $24.3 million of assets and $323.4 million of debts as of June 30. Its filing includes the holding company, which was not part of the Aug. 21 asset sale to BBVA.

The bank is the second-largest to fail in the United States this year, after Montgomery, Alabama's Colonial BancGroup Inc (CBCGQ.PK), according to the Federal Deposit Insurance Corp. Colonial filed for bankruptcy protection on Tuesday.

Guaranty had been the third-largest publicly traded bank in Texas. Its banking unit had roughly $13 billion of assets, $12 billion of deposits, 103 branches in Texas and 59 branches in California, the FDIC said.

It collapsed from losses on mortgage-backed securities, whose value tumbled as falling real estate valuations caused defaults on the underlying loans to increase substantially, and on loans it made itself.

Guaranty's largest investors included Carl Icahn and Robert Rowling, whose investment firm owns the Omni Hotels chain.

BBVA agreed to buy about $12 billion of Guaranty Bank's assets. The FDIC agreed to share in losses on $11 billion.

The largest publicly traded banks based in Texas include Comerica Inc (CMA.N) and Cullen/Frost Bankers Inc (CFR.N).

Guaranty has said it began operations in 1988, and was spun off in December 2007 by Temple-Inland Inc (TIN.N), a corrugated packaging and building products company.

The case is In re Guaranty Financial Group Inc, U.S. Bankruptcy Court, Northern District of Texas (Dallas), No. 09-35582.

(Reporting by Jonathan Stempel; Editing by Richard Chang)