Cravath, Swaine & Moore and Wachtell Lipton Rosen & Katz have taken lead roles in Mylan N.V. and Pfizer Inc.’s all-stock tie-up.

Cravath, Swaine & Moore took the lead for Mylan, along with European law firm NautaDutilh. Mark Greene, the head of Cravath’s corporate department, along with corporate partners Thomas Dunn and Aaron Gruber led the firm’s deal team.

Cravath has long counseled Mylan on a wide array of matters. In 2015, it represented Mylan in its successful takeover defense against Teva Pharmaceutical Industries’ $40 billion bid.

Willkie Farr & Gallagher represented Mylan’s financial advisers Centerview Partners LLC and PJT Partners, with partners Steve Seidman and Laura Delanoy taking the lead.

Wachtell, along with Dutch law firm De Brauw Blackstone Westbroek, advised Pfizer on the deal. Co-chair of Wachtell’s executive committee Ed Herlihy along with corporate partners David Lam and Gordon Moodie led Wachtell’s team in the transaction.

Wachtell has long advised the pharmaceutical company.

Davis Polk & Wardwell served as special tax counsel in the tie-up, with its new managing partner Neil Barr and tax partners Michael Mollerus and Po Sit taking lead roles.

Morgan Lewis & Bockius advised Pfizer with respect of the U.S. antitrust work, with Scott Stempel and Harry Robins leading the team.

Pfizer is offloading its off-patent drug division Upjohn, which contains Celebrex, Lipitor and Viagra, to generic drug maker and EpiPen producer Mylan to create a new global pharmaceutical company .

The deal is expected to close mid-2020, pending Mylan shareholder and regulatory approval.