Santa Ana-based Grubb & Ellis Co. said on Tuesday that it has filed for bankruptcy and will sell "substantially" all of its assets to New York-based brokerage BGC Partners LP for $30 million.

The struggling commercial real estate brokerage filed for Chapter 11 bankruptcy protection in the Southern District of New York, listing $150 million in assets and $167 million in debts.

The company cited the financial crisis of 2007-2009, and Grubb & Ellis’ ill-fated 2007 merger with Santa Ana-based NNN Realty Advisors, for its financial issues.

BGC will provide Grubb & Ellis a $4.8 million loan while the company is in bankruptcy, in addition to making a $30 million credit bid for the company's assets, according to regulatory filings.

BGC last year acquired another commercial real estate brokerage, New York-based Newmark Knight Frank, for $63 million and stock.

Grubb & Ellis said in mid-January that it was in talks with a potential deal with BGC, but a transaction wasn’t completed during an exclusivity agreement that ran through the end of the month.