Linklaters, Kirkland & Ellis and Weil Gotshal & Manges have taken lead roles on the $3.2bn (£2bn) acquisition of the Royal Bank of Scotland's payment-processing unit by Bain Capital and Advent International, reports The Am Law Daily.

Bain and Advent have both targeted a purchase of the RBS unit, called WorldPay, for several years, according to Advent's managing director James Brocklebank.

The seeds of the deal were planted about a year ago, when RBS announced plans for a series of asset sales in order to raise cash to repay bailout funds. One of those asset sales came to fruition last week with RBS announcing that it is unloading more than 300 branches to Santander for about £2bn.

Linklaters advised RBS on the Santander deal and revised that role for the Bain/Advent deal, which was announced last Friday (6 August). London corporate patner Matthew Middleditch led the magic circle firm's team.

Weil advised Advent, with Weil and Kirkland working together, according to Kirkland London chief James Learner, who headed up the firm's team alongside finance partner Stephen Gillespie. London-based private equity partner Marco Compagnoni led the Weil Gotshal team.

Carving out one piece of a larger entity such as RBS is always complicated, Learner said. The deal teams must figure out how to separate the unit from its former parent company and negotiate how the new standalone unit will relate to RBS going forward, he added.

In this instance, RBS will maintain a 19.9% stake in WorldPay and could receive as much as about $320m (£200m) in contingency payments depending on WorldPay's performance and how Bain and Advent investors make out in the deal, Learner said.