Bank of America Corp said Tuesday it will close its correspondent mortgage lending business by the end of the year after failing to find a buyer for the operation.

The largest U.S. bank said in August that it planned to exit the business, either by selling it or winding it down. The unit funds loans made by smaller banks.

Bank of America will continue to make loans directly to retail customers.

Since taking over last year, Bank of America Chief Executive Brian Moynihan has been selling off business lines and shedding riskier operations as he looks to raise capital to cover mortgage losses and to meet new international capital standards.

The bank will transfer many of its 1,200 correspondent lending employees to other businesses, bank spokesman Rick Simon said. In a first step, about 100 employees in Westlake Village, California, will be moved during the week of October 17 to the unit that handles troubled mortgage loans.

The bank's correspondent lending employees are primarily based in Westlake Village; Tampa, Florida; and Thousand Oaks, California.

(Reporting by Rick Rothacker in Charlotte; Editing by Richard Chang)

(This story was corrected in the lead to read buyer)