By Rick Rothacker

(Reuters) - The Bank of America Corp unit that handles troubled home loans has grown more than tenfold since the bank bought ailing mortgage lender Countrywide Financial in 2008, documents obtained by Reuters show, shining new light on the scale of the clean-up the purchase entailed.

While most attention has focused on the No. 2 U.S. bank's $35 billion in mortgage losses stemming from settlements and repurchases of soured home loans, information the bank provided to the Federal Reserve in 2008 and recent company reports show the mortgage mess could undermine efforts to improve profits for some time to come.

Bank of America now employs some 42,000 people - or nearly 1 in 6 of its 275,000 employees - in Legacy Asset Servicing, the unit that services problem mortgages. Operating costs in the mortgage servicing business reached $2.7 billion in the second quarter, up 29 percent from a year ago, as the bank added 7,000 workers to handle foreclosure reviews and loan modifications required under government settlements.

The bank has also had as many as 16,000 additional contractors working in the unit, according to company reports.

In 2008, as Bank of America was seeking regulatory approval for the Countrywide deal, it told the Fed the two companies had a combined 3,900 employees working on "housing retention," a number that had already doubled in the previous year, according to the documents, which were obtained by Reuters through a Freedom of Information request.

That is not a direct comparison to the 42,000 full-time employees in the mortgage servicing unit now, as it has been restructured over time to include servicing for borrowers who have not defaulted. But default servicing is the largest team within the group, and its overall staffing levels are a good proxy to show how much the bank has had to ramp up to deal with the mess.

The hiring has come as the bank has set out to eliminate 30,000 consumer banking and technology jobs under a program called Project New BAC to cut $8 billion in annual expenses by the middle of 2015. It means that while 20,000 jobs have been eliminated in the past year, the overall headcount is down by only 13,000.

Despite the hiring and spending, Bank of America recently ranked last among five big lenders in modifying mortgages. Like some of its peers, borrowers and consumer advocates have repeatedly accused the bank of losing borrower paperwork, speeding up foreclosures and giving homeowners the runaround when they try to get their loan payments reduced.

Reining in these cleanup costs will be critical to financial performance over the next couple of years, as the bank retools to offset reductions in revenue due to new regulations, a tepid economy and low interest rates.

The $2.7 billion in operating expenses equaled 15 percent of Bank of America's noninterest expense in the second quarter. It is also more than five times as high as the $500 million per quarter that CEO Brian Moynihan has projected the bank could spend on servicing in times of more normal delinquencies. The figure doesn't include mortgage-related litigation expenses.

"This is perhaps the biggest earnings lever they have," said KBW analyst Jefferson Harralson.

Investors will get an update on its costs when the bank reports third-quarter earnings on Oct 17. It is likely to post a small loss after reaching a $2.4 billion settlement of allegations that it failed to disclose bonus payments and ballooning losses ahead of its 2009 Merrill Lynch acquisition, according to a survey of analysts by Thomson Reuters I/B/E/S.

Bank of America spokesman Dan Frahm said the bank has invested heavily in its Legacy Asset Servicing unit to assist customers, boost the housing market and help the company move forward after the Countrywide acquisition.

"We will not sacrifice service to our customers in need of assistance," Frahm said, adding that the team has helped more than 1.4 million mortgage customers avoid foreclosure.

"As the economy improves and we continue to resolve customer needs, we will further reduce the number of delinquent loans to service and the size of the Legacy Asset Servicing organization will be reduced," he said.

The unit was designed as a "temporary solution to address specific needs" and was built up using contractors and vendors so the bank could eventually reduce it in size, he said.

'TOO EARLY TO SCALE BACK'

For now, though, the bank is struggling to bring the problem under control.

Moynihan said in October 2011 that mortgage servicing had peaked, but expenses have climbed since then. In May, he told investors the costs should start coming down in the second half of this year, but then in July he said "meaningful" improvement would not begin until the end of this year or early in 2013.

Last month, Chief Financial Officer Bruce Thompson said at an investor conference that lower costs for servicing are "going to be very much in the future."

The bank has underestimated the extent of problems at the business in the past, the Fed documents show.

In May 2008, the bank said it planned to maintain the "historically high staffing levels" for at least a year after the deal closed, according to the documents.

Despite ramping up staffing, Bank of America has fallen behind rivals in meeting terms of a $25 billion pact finalized in April with state and federal officials.

As of June 30, the bank had not modified any first-lien mortgages under the national mortgage settlement, according to a report issued by monitor Joseph Smith. The other four lenders in the settlement had completed some modifications.

The agreement requires banks to pay penalties over foreclosure-related errors, modify mortgages by reducing principal owed and refinance loans for customers whose mortgages are worth more than their homes. Bank of America owes the most: $11.8 billion in payments and consumer assistance.

Bank of America has called Smith's report an "early snapshot" and has said it has made significant progress since June 30, completing nearly $600 million in loan modification as of August 21. The bank has said it plans to meet conditions of the settlement.

"It's clearly too early to scale back because they haven't even scaled up to meet all of the obligations that have been imposed on them," said Stella Adams, director of the National Fair Housing Training Academy, which provides fair housing and civil rights training to government agencies, industry officials and others.

(Reporting By Rick Rothacker in Charlotte, North Carolina; Editing by Martin Howell and David Gregorio)