The first of four mortgage deals that Bank of American completed in a $1.5 trillion sale that ended on Wednesday.

The first installment, $4.8 billion, went to Ally Financial, a lender of limited credit and mortgage servicing that has a stake in Ally Financial’s mortgage business.

Ally Financial also had a $700 million line of credit for Ally’s Ally Direct business.

The other two deals, totaling $3.2 billion, were for $1 billion in commercial and home loans, and $2 billion for other mortgage products.

BofA and Ally Financial both said in a statement they were “pleased” with the final product.

They were able to combine their interests in the businesses to maximize the return for investors.

“The combination of our combined financial interests and the investment in our mortgage business is the best investment for our shareholders and our investors,” said Paul Goldschmidt, senior vice president and chief financial officer at Ally Financial.

“We look forward to continuing to work together to drive growth in the commercial and residential mortgage business in the future.”

In addition to Ally, Bank of Americas, one of the country’s largest mortgage lenders, also received a $3 billion line of Credit Default Swaps financing deal from Bank of New York Mellon.

It also secured a $500 million line loan from a subsidiary of Wells Fargo, another of Bank of the West’s lenders.

Bank of America is one of three banks that are part of the so-called Big Four banks, which include Bank of Tokyo-Mitsubishi UFJ, Bank Of America, Wells Fargo and Citigroup.

Banks that have a stake or a majority stake in these big banks include Bank Of Japan, Bank A.M., JPMorgan Chase & Co. and Citibank.

Other banks involved in the deal include: U.S. Bancorp, Citigroup Inc., BB&T Corp., Bank of Nova Scotia, U.K.-based Royal Bank of Scotland, UBS Group AG and State Street Corp.