SAN FRANCISCO (MarketWatch) -- Countrywide Financial Corp. said late Friday that up to 20% of its employees stand to get laid off within three months, as the nation's largest mortgage lender slashes costs in a desperate attempt to stay financially afloat.

The Calabasas, Calif.-based company CFC, announced that it plans to reduce its workforce by 10,000 to 12,000 jobs, or up to 20%, mostly in areas impacted by lower mortgage-market origination volumes.

Countrywide said that the reductions could be less than projected if the interest-rate environment and outlook for market volume outlook improve. Based on current interest-rate levels, the company added that it expects total origination volumes will fall about 25% in 2008 from 2007.

Countrywide had grown its payrolls rapidly in past years to take advantage of the U.S. boom in real estate. But it has been hit hard by recent turmoil in home-loan markets, triggered by a wave of subprime defaults, and the lender already has suffered a sharp drop in originations this year.

This turmoil has made it harder for companies like Countrywide to tap debt markets. Last month, Countrywide borrowed $11.5 billion from a group of 40 banks because the company struggled to get financing in the secondary mortgage market or the commercial-paper market.

The lender said that it continues to move its residential-lending business into its federally chartered thrift entity, Countrywide Bank, FSB as it tries to increase liquidity and reduce borrowing costs. By Sept. 30, almost all home-loan production will be originated within the bank, according to the company.

Countrywide is the latest company linked to housing to release a wave of pink slips. Companies in the mortgage and housing sectors have cut more than 80,000 jobs this year. See running tally of housing-sector layoffs.

American Home Mortgage Investment Corp. AHMIQ, once the 10th biggest mortgage lender in the United States, in early August announced that it was laying off 6,000 workers and then filed for bankruptcy protection.

On Friday, the Labor Department said that U.S. employers cut back hiring in August for the first time in four years, as the downturn in the housing market took its toll on construction jobs and manufacturing employment fell. See Economic Report.

At the end of 2001, the year the Federal Reserve slashed interest rates to 1.75% from 6.5%, Countrywide had fewer than 18,000 employees on its payrolls. By the end of 2006, that number had tripled, to nearly 55,000.

Shares of Countrywide fell 1.5% to $18.21 by the close of trading Friday. In after-hours trading, they rose 1%.