Hewlett Packard (HP) has named Morgan Lewis partner Michael Holsten – a long-term adviser of the computer giant – as its new general counsel.

Holsten will be responsible for the company's global legal affairs, privacy and ethics matters and replaces former general counsel Ann Baskins in the role.

He takes up his new role on 22 February and will report to HP chairman and chief executive Mark Hurd. Holsten will also join the company's executive leadership team.

Holsten, who has advised HP for more than 10 years, played a key role in handling the corporate spying scandal that rocked the computer giant last year. Baskins resigned from the company on 28 September.

Hurd said in a statement: "Mike is a first-rate lawyer, with extensive trial and government-relations experience, as well as a deep knowledge of HP and its culture."

HP is one of the largest computer companies in the world, with revenues of over $91bn (£46.3bn). Last year it admitted hiring private investigators and using pretexting – the fraudulent use of another's identity – to find the sources of boardroom news leaks.