It's official.

Bank of New York

(BK) - Get Report

announced Saturday that it will trade its retail banking business for

J.P. Morgan Chase's

(JPM) - Get Report

corporate trust unit and $150 million in cash.

Speculation about a deal had swirled in the market for weeks.

Each company hopes the transaction will bolster its respective strategy. Bank of New York wants to focus on corporate and wealthy individual clients, while J.P. Morgan wants to increase its count of neighborhood retail branches.

Under the terms of the agreement, Bank of New York will sell its retail and regional middle-market businesses to J.P. Morgan for $3.1 billion with a premium of $2.3 billion, according to a news release posted on Bank of New York¿s Web site. J.P. Morgan will sell its corporate trust business to Bank of New York for $2.8 billion with a premium of $2.15 billion. The difference in premiums results in a net cash payment of $150 million to Bank of New York. There is also a contingent payment of up to $50 million to Bank of New York tied to customer retention.

Both companies' boards have signed off on the deal, which the parties expect to complete late in the third quarter or during the fourth quarter.

Bank of New York expects to record an after-tax gain of $1.3 billion and take an after-tax charge of $90 million to $120 million because of the deal. It also expects the transaction to dilute earnings per share by 4.5% in 2007 on a generally-accepted-accounting-principles basis. That figure will decrease to 1.5% in 2009. The bank expects the deal will be accretive to cash EPS, which exclude some items, starting in 2009.

Bank of New York plans to hold a conference call for analysts and investors at 8:30 a.m. EDT Monday to discuss the deal.

Bank of New York shares ended the week at $36.83, while J.P. Morgan stock closed at $41.99.