Countrywide Financial Corp, the biggest U.S. mortgage lender by value of loans, reported an $893 million loss for the first quarter on missed mortgage payments, rising home foreclosures and writedowns.

Countrywide is reporting its third straight quarter of losses. In the first quarter it had a net loss of $1.60 per share compared with a profit of $434 million, or 72 cents a year earlier. Its net revenue fell 72 percent to $678.9 million.

In January, as its financial difficulties mounted, the mortgage lender agreed to sell itself to Bank of America Corp. The sale is expected to be completed by the third quarter.

The company continues to expect heavy losses, stating that it will set apart $1.5 billion for bad loans in the coming quarter, compared to only $158 million in expected losses a year earlier.

Losses in the current quarter include $441 million in impairment charges for home equity securitizations. It also wrote down $390 million of assets for mortgages it can't sell.

Shares of Countrywide rose 2 cents, or 0.34 percent to close at $5.85. Bank of America shares fell 32 cents, or 0.84 percent to close at $37.86.