The bank said it signed a definitive agreement with the Wisconsin-based bank to exchange 0.1257 shares of Bank of Montreal for each share of M and I.

Shares of M and I surged 19 percent, up $1.11, to $6.90 in morning trading. US-traded shares of the Bank of Montreal's parent, BMO Financial Group, fell $4.24, or 6.8 percent, to $57.42 in morning trading on the New York Stock Exchange.

Canada's fourth largest bank is doubling its presence in the US from 321 branches to 695. The Bank of Montreal has previously extended its business in the US Midwest through its Chicago-based Harris unit.

Canadian banks, ranked the soundest in the world by the World Economic Forum, have been buying distressed banks in the US in recent years. Canadian banks weathered the economic crisis far better than their counterparts in other countries.

In Canada's concentrated banking system, five major banks dominate the market. The banks have been looking outside Canada to grow.

"The combination of Harris Bank and M and I is a perfect fit.

It more than doubles the size of our branch footprint in the US, doubles our customer base in personal and commercial banking. It gives us a meaningful market position in cities in the midwest," Bank of Montreal President and CEO Bill Downe said in a conference call with analysts.

Downe said the addition of the Wisconsin bank would "align well with BMO's retail, commercial, and asset (and) wealth management businesses in the US." M and I is headquartered in Milwaukee and has $51.9 billion in assets. The bank has more than 190 offices throughout Wisconsin as well as locations in Indiana, Minnesota and other states.

Toronto-based BMO Financial Group said it is buying Marshall and Ilsley's $1.7 billion in Troubled Asset Relief Program preferred shares and will repay them in full before the acquisition closes.

Bank of Montreal said once the transaction is completed, Marshall and Ilsley President and CEO Mark Furlong will become the CEO of the combined banks' US personal and commercial banking business, based in Chicago.

The Bank of Montreal said the transaction has been approved by the boards of both banks and is expected to close before July 31.

Many Canadian analysts have long been waiting for BMO to bulk up its US assets.

"One of investors' long voiced complaints about BMO's strategy had been the lack of movement around its US banking operations under the Harris banner," wrote Barclay's analyst John Aiken in a note.

"Strategically, the acquisition makes a lot of sense, given the geographic overlap of the core operations, principally Wisconsin and Indiana as well as broadening BMO's scope in other key regions such as Arizona and Florida as well as M and I's focus on mid-market commercial lending." Toronto-Dominion Bank, Canada's second largest bank, has also expanded its US presence in recent years with the purchase of New Jersey-based Commerce Bancorp and smaller, troubled banks in the Carolinas and Florida such as South Carolina-based South Financial Group. Earlier this year, TD agreed to buy the risky assets of three insolvent Florida banks worth $3.8 billion. Riverside National Bank of Florida, First Federal Bank of North Florida and AmericanFirst Bank were all purchased with the help of US Federal Deposit Insurance Corp. TD didn't have a presence in US six years ago, but now has about 1,300 branches in the US compared to about 1,100 in Canada.

Canadian banks are investing in the US from a position of strength. There was no mortgage meltdown or subprime crisis in Canada. Banks don't package mortgages and sell them to the private market, so they need to be sure their borrowers can pay back the loans.