Mayer Brown, CMS Cameron McKenna and Baker & McKenzie have taken the lead roles on the sale of the National Lottery operator Camelot for just under £400m.

The board of Camelot has agreed to sell the company to one of Canada's largest pension funds, Ontario Teachers' Pension Plan (OTPP), in favour of a rival bid from buyout giant CVC.

Mayer Brown came in for the five shareholders of Camelot – Cadbury, De La Rue, Fujitsu, Royal Mail and Thales – with a team headed up by corporate partners Jeffrey Gordon and Kate Ball-Dodd.

Camerons advised Camelot with on the sale, with corporate partner Louise Wallace leading the team.

OTPP's long-term equities team turned to regular adviser Bakers for the acquisition, which still requires ratification by the National Lottery Commission. The team from Bakers was led by corporate partner Charles Whitefoord alongside banking partner Bernard Sharp.

Allen & Overy was instructed by the lenders – RBC and Royal Bank of Scotland – with banking partner Conrad Andersen the lead lawyer.

It is understood that private equity partner Graham White at Kirkland & Ellis led the team advising CVC on its failed bid.

OTPP recently launched in Europe to ramp up its direct investments in the region and already has stakes in Birmingham and Bristol airports. Earlier this year the fund bought Acorn Care and Education – which provides foster care and schools for children with learning disabilities – for a reported £150m from Phoenix Equity Partners and Acorn's management. Weil Gotshal & Manges advised OTPP on that occasion with a team headed up by private equity partner Jonathan Wood.