The Bank of New York (BK) swapped its 338 retail branches and a regional small business operation for the corporate trust business of JPMorgan Chase (JPM), the companies announced Saturday.

JPMorgan Chase also is giving $150 million to the Bank of New York for the difference in value between the multibillion-dollars worth of assets being exchanged by the two New York-based institutions.

JPMorgan Chase will take over Bank of New York's branches in New York, New Jersey and Connecticut, serving about 700,000 consumers and small businesses. It will also take over the bank's small business operation in the same area, serving about 2,000 clients.

The agreement already was approved by both company's board of directors, and was expected to be completed before the end of the year. It was rumored for weeks before the announcement was made Saturday.

The Bank of New York, founded with the help of Alexander Hamilton in 1784, will take over JPMorgan Chase's corporate trust operation, with 2,400 employees in more than 40 locations around the world. The operation represents more than $5 trillion in total debt outstanding.

The Bank of New York is among the nation's largest trust banks and makes the bulk of its money in securities processing, treasury management and investment management.

JPMorgan Chase is the nation's third largest bank by assets, behind Citigroup Inc. (C) and Bank of America (BAC) Corp.