A raft of international and European firms, including Macfarlanes, Gleiss Lutz and Baker McKenzie, are advising on U.S.-based Stifel Financial Group’s acquisition of Germany’s MainFirst Bank.

Stifel is preparing for the U.K.’s exit from the European Union with the move, which will allow the company to offer financial services throughout the E.U. post-Brexit.

Stifel, which is based in Missouri and is listed on the New York Stock Exchange, is acquiring the German investment bank’s businesses in Germany, Switzerland and the U.S.

In a statement announcing the deal, MainFirst said the transaction would combine Stifel’s existing strength in the U.K. market to create a pan-European platform, and that its German banking license would enable Stifel to continue offering services such as corporate advisory, brokerage and investment banking post-Brexit.

German heavyweight Gleiss Lutz, Swiss outfit Bar & Karrer, France’s Gide Loyrette Nouel, and Macfarlanes are advising Stifel on the deal, while Bakers is advising MainFirst, with a team led by German corporate partner Christoph Wolf and tax partners Stephan Behnes and Christian Port, accompanied by corporate partner Gordon Low and tax partner Alistair Craig.

The Gleiss team is being led by private equity partner Jan Balssen and includes tax partner Stefan Mayer, finance partners Eva Reudelhuber and Maximilian von Rom, corporate and capital markets partner Stephan Aubel, and employment partner Thomas Winzer.

Macfarlanes is advising Stifel on U.K. legal matters, with its team made up of corporate and M&A partner Luke Powell and tax partner Peter Abbott. Bar & Karrer is acting as Swiss legal adviser to Stifel, fielding a team made up of M&A, banking and insurance partner Peter Hsu and tax partner Christoph Suter.

Gide is advising Stifel on the French corporate, regulatory and employment aspects of the acquisition, with a team comprising M&A and corporate partner Jean-Gabriel Flandrois and employment partner Foulques de Rostolan.