Weil Gotshal & Manges corporate veteran Peter King is leaving the firm to take up a senior role at the Treasury.

King, who has been at Weil for almost 10 years after joining from Shearman & Sterling where he was London head of corporate, is set to leave the US firm next month to join the Treasury as legal director.

In an email to colleagues announcing his departure, King said that his new role will see him lead a team of about 60 lawyers providing legal advice to government ministers and officials. He is replacing Treasury legal adviser Stephen Parker, who retired this summer.

In the email, King described his new position as "a very interesting and challenging role, particularly in the current circumstances".

Before joining Weil in 2008, King spent five years at Shearman, which he joined in 2003 after a long career at Linklaters. He spent more than 20 years with the magic circle firm, making partner in 1990 and working with major clients including Rio Tinto and Merrill Lynch.

During his time at Weil, King acted on several high-profile deals including the initial public offering (IPO) of DFS, the $18bn Willis Towers Watson merger and the £890m Worldpay IPO. In 2012, he was part of the firm's team advising the AAR consortium on the $28bn sale of their stake in the Russian oil joint venture TNK-BP to Rosneft.

While at Shearman, he advised on Qatari investment group Delta Two's £12bn bid for Sainsbury's and Depfa Bank's €5.7bn acquisition by Hypo Real Estate in 2007 which, at the time, was the largest ever corporate acquisition in Ireland.

In a 2007 interview with Legal Week, he cited the 2005 corporate reorganisation of O2 as one of his career highlights.

At Weil, King was also co-chair of the firm's pro bono committee – a role he took up in 2014.

Weil's London office is led by corporate partner Mike Francies. Recent City recruits for the firm have included Berwin Leighton Paisner real estate partner Anthea Bamford, whose hire was announced last week, and Herbert Smith Freehills London private equity head James MacArthur, who joined last year.

Weil said: "Whilst we are sad to see Peter leave private practice, we are delighted that he has decided to take up such a prestigious and challenging opportunity. He has done an excellent job of providing corporate support to our clients as well as providing a valuable contribution to the firm through his role as co-chair of the firm's Pro Bono Committee. We wish Peter all the best in his exciting new role."