Xerox Corp., the Norwalk, Connecticut-based company made famous for its copying and fax machines, announced a deal Friday with activist investor Carl Icahn to split the historic corporate entity into two separate publicly traded companies.

Cravath, Swaine & Moore and Paul, Weiss, Rifkind, Wharton & Garrison have grabbed the lead roles advising Xerox on its proposed split, which will see the company’s hardware operations and its services business exist as two different companies. The move effectively reverses Xerox’s $6.4 billion acquisition of Affiliated Computer Services Inc. in late 2009, which saw the document management company acquire the business process outsourcer.

Cravath, which has been Xerox’s longtime outside counsel, was conflicted out of advising the company on that deal, as it was representing Dallas-based ACS on the merger, according to our previous reports. Cravath has previously handled Xerox’s $1.5 billion buy of Global Imaging Systems Inc. in 2007 and the company’s $1.05 billion sale of its IT outsourcing business to France’s Atos SE in 2014. That same year, Cravath helped Xerox defeat a long-running investor class action in New York.

Securities filings show that Cravath corporate partners Scott Barshay and O. Keith Hallam III in New York are advising Xerox on its split. Paul Weiss litigation partner and firm chair Brad Karp and corporate department chair Robert Schumer are representing the company’s board of directors on the matter. (Paul Weiss also has long-standing ties to Xerox, having advised the board’s audit committee more than a decade ago in an internal investigation of the company’s accounting practices.)

Don Liu, an advocate for diversity among Xerox’s outside legal advisers, has served as the company’s general counsel since 2007. He succeeded the retiring J. Michael Farren, who would go on to make headlines three years later by nearly killing his ex-wife, former Skadden, Arps, Slate, Meagher & Flom counsel Mary Margaret Farren, in a domestic violence incident. (Farren was convicted of attempted murder in 2014, and a Connecticut appellate court upheld a $28.6 million civil judgment against him last month.)

Xerox’s legal and compliance solutions unit, which last year opened a data center in Hong Kong, provides electronic discovery and transactional support services to law firm and corporate clients. The division is currently housed within Xerox’s business processing outsourcing arm, and a source said the company doesn’t currently have plans to move it to its new technology spinoff.

Icahn, who recently amassed an 8.13 percent stake in Xerox, will get three seats on the board of the new business services company. The corporate raider was advised by Jesse Lynn and Louis Pastor at his holding company Icahn Enterprises, where the duo are general counsel and deputy general counsel, respectively. (Last year Lynn replaced longtime Icahn general counsel Keith Schaitkin, who retired and is now a special adviser to Corvex Management LP, a New York-based hedge fund founded by former Icahn protégé Keith Meister.)

Xerox expects its split to be completed by year’s end in a transaction that it expects will be tax-free to shareholders for federal income tax purposes.