Bank of Montreal has agreed to buy BNP Paribas SA’s Bank of the West unit for $16.3 billion, extending its presence in the U.S. and giving the French seller a windfall before its new strategic plan.

BMO will fund the transaction, which should add 1.8 million customers upon closing next year, in cash and mainly with excess capital, according to a statement. Bloomberg had previously reported the Canadian bank’s interest.

“This acquisition will add meaningful scale, expansion in attractive markets, and capabilities that will enable us to drive greater growth, returns and efficiencies,” said BMO Chief Executive Officer Darryl White.

BMO’s largest acquisition ever extends its retail footprint into the western U.S. while also bulking up its already-sizable commercial business. The bank, Canada’s fourth-largest by assets, already has a significant presence throughout the Midwest from its acquisition of Harris Bankcorp in the 1980s and a takeover of Marshall & Ilsley a decade ago.

BNP Paribas will use proceeds from the sale for stock repurchases, investments and bolt-on deals, the Paris-based bank said. The deal will generate a net capital gain of about 2.9 billion euros ($3.3 billion) and add about 170 basis points to the lender’s CET1 ratio.

BNP plans to make an extraordinary distribution to shareholders via a buyback to compensate for diluted earnings per share. That could be around 4 billion euros, it said. BNP expects to deploy a further 7 billion euros through organic growth, technology investments and bolt-on acquisitions.

The transaction adds to a series of foreign lenders’ exits from U.S. banking as they take advantage of regional banks’ thirst for deals in their ambition to compete with the retail businesses of Wall Street giants. In 2020, Banco Bilbao Vizcaya Argentaria SA sold its U.S. banking operations for $11.6 billion, followed this year by MUFG Bank NA, which sold its U.S. franchise for $8 billion.

U.S. bank valuations, already inflated by the current wave of consolidation, have also got a boost from the U.S. Federal Reserve’s hawkish pivot aimed at reining in inflation. In Europe, meanwhile, banking consolidation has been on ice: higher capital requirements are an impediment for large cross-border deals, even as markets remain fragmented.

BNP’s 900-million euro share buyback program ended in December and the bank is due to update targets and potentially announce new capital return plans early next year. Italy’s UniCredit SpA saw its shares jump earlier this month after Chief Executive Officer Andrea Orcel announced a huge new buyback program.