Weil Gotshal & Manges has taken the lead role on All3Media's £40m acquisition of Optomen, the TV production company behind shows including The F Word, in a deal that will hand millions of pounds to celebrity chef Gordon Ramsay.

The deal sees All3Media acquire Optomen and One Potato Two Potato, which was set up as a joint venture with Ramsay in 2008 and produces all of his hit TV series, including the US versions of Ramsay's Kitchen Nightmares and Hell's Kitchen.

Ramsay (pictured) owns a 50% stake in One Potato Two Potato and will earn millions as a result of the deal.

All3Media was advised by Weil Gotshal, which fielded a team led by corporate partner Mark Soundy.

Soundy said: "This has been a very rewarding transaction, especially because of our longstanding relationship with the acquirers, which goes back to the buyout that created All3Media in the first place."

Ramsay instructed corporate partner Sheldon Cordell at specialist West End firm Joelson Wilson.

Media law firm Wiggin and boutique firm Clarity Capital Partners advised Optomen on the deal, with the Wiggin team led by corporate partner Michael Brader.

In 2006 Weil advised private equity house Bridgepoint Capital on the £320m sale of All3Media to Permira, a deal on which Soundy also took the lead role alongside fellow partner Marco Compagnoni.