Linklaters and Allen & Overy have taken lead roles on a $3.6 billion deal between U.S. private equity giant the Carlyle Group and UAE sovereign wealth fund Mubadala.

Carlyle will purchase between a 30 and 40 percent stake in Madrid-based CEPSA, Europe's largest privately-owned oil and gas company, from the $225 billion Emirati wealth fund.

The transaction is due to close by the end of 2019, subject to regulatory approval, with Mubadala retaining a majority shareholding in the business.

Linklaters is advising the Carlyle Group, with a team led by U.K. corporate partner Owen Clay and Madrid corporate partner Alejandro Ortiz. Projects partner Mark Russell and corporate partner Stuart Bedford also advised.

Clay said in a statement that the recovery of oil prices and "attractive asset valuations" has increased the number of M&A deals that Linklaters is seeing by private equity firms in the energy sector.

He added: "This deal is a great example of that and we could see similar transactions over the coming year."

A&O advised both CEPSA and Mubadala on the transaction, with a team led by Madrid corporate partner Fernando Torrente and Abu Dhabi corporate partner Nicholas Stuart.

Torrente led for A&O on the €16.5bn takeover of Spanish motorway operator Abertis late last year – a deal involving 10 law firms and described by one as "without any doubt one of the largest and most complex deals done in Spain in the last 15 years".