US firms Paul Weiss Rifkind Wharton & Garrison and Skadden Arps Slate Meagher & Flom have taken leading roles on IT giant IBM's $34bn (£26bn) acquisition of US open-source software company Red Hat.

If approved, it will reportedly be the largest software acquisition ever made, and the largest M&A deal in IBM's history.

Paul Weiss global head of M&A Scott Barshay, M&A partner Steve Williams and finance co-head Gregory Ezring, all based in New York, are advising IBM, while Hogan Lovells is advising the New York-based tech giant on antitrust matters.

Red Hat is being advised by Skadden M&A partners Howard Ellin and Brandon Van Dyke, also based in New York, alongside executive compensation and benefits partner Regina Olshan, antitrust partners Clifford Aronson and Frederic Depoortere, banking partner Stephanie Teicher, tax partners David Rievman and Gavin White, intellectual partner Stuart Levi, and employment partner David Schwartz.

The deal eclipses Microsoft's $26.2bn purchase of LinkedIn in 2016 and Facebook's $22bn takeover of messaging app Whatsapp in 2014.

Debevoise & Plimpton is representing Guggenheim Partners and Morgan Stanley in their roles as financial advisers to the target, while securities filings show that Simpson Thacher is working on financing for the deal arranged by JPMorgan Chase and Goldman Sachs.

The acquisition has been approved by the boards of directors at both IBM and Red Hat, and is expected to close in the latter half of 2019.

Skadden also took a leading role on computing giant Dell's $67bn takeover of data storage company EMC in 2015, currently the largest tech M&A deal ever completed. Skadden advised EMC, with US firms Simpson Thacher & Bartlett advising Dell and private equity firm Silver Lake, and Wachtell Lipton Rosen & Katz advising CEO and founder Michael Dell and investment adviser MSD Partners.