Like scorned lovers, Bank of America (NYSE:BAC) and Fannie Mae, the government-controlled mortgage giant, are having a very public falling out.

Last week, Bank of America said it had stopped selling mortgages to Fannie, with the exception of some refinances. On Wednesday, Fannie said in a regulatory filing that the "expiration and mutual nonrenewal" of contracts led to the breakup. Bank of America continues to work with Fannie's sibling, Freddie Mac, which performs virtually the same role of guaranteeing mortgages.

The conflict revolves around Bank of America's resistance to repurchasing mortgages that were packaged during the housing boom and sold to Fannie. Once seen as sure-fire profit machines, the now-toxic securities have been revealed as time bombs, and Fannie has scrambled to get them off its books.

Bank of America accounts for 59 percent of Fannie's outstanding repurchase requests, far more than the other major lenders.

And Fannie continues to be dragged down by its legacy portfolio. It lost $2.4 billion in the last quarter of 2011, largely from its pre-2009 book and declining home prices, the company said Wednesday.

The loss narrowed from a $5.1 billion loss in the third quarter of 2011, but for the full year, Fannie Mae had a net loss of $16.9 billion, exceeding the $14 billion lost in 2010. It requested $4.6 billion from the U.S. Treasury to continue operations.

Fannie's fall has coincided with the souring of its relationship with Bank of America's mortgage division, formerly Countrywide Financial, with which it was previously intimately entwined.

Countrywide, one of the biggest subprime lenders, sold a massive number of loans to Fannie during the boom. Countrywide's former chief, Angelo Mozilo, considered former Fannie executives James Johnson and Franklin Raines as "friends of Angelo," even reportedly giving them lower mortgages rates in defiance of ethics rules.

Now, Fannie is attempting to move forward with stiffer approval standards for the mortgages it buys.

"While economic factors such as falling home prices and high unemployment produced strong headwinds for our business again in 2011, we continued to grow a very strong new book of business, as we have since 2009," said Michael Williams, outgoing president and CEO of the company, in a statement.

He said Fannie funded the housing market with more than $650 billion in liquidity during the year. Since 2009, the company has underwritten 6.6 million refinances, 1.9 new mortgages and 1.1 million units of rental housing.

But perhaps the biggest losers in the Bank of America and Fannie dispute are American homeowners, who will have one less outlet when seeking to secure a mortgage.