Modem, which previously worked on the account from its London office on a project basis, is understood to have pitched against McCann Erickson for the account.
It is thought that digital work created by Modem will drive the above-the-line creative.
The account covers HP's Technology Solutions Group, which sells servers, and the Personal Systems Group, which sells notebooks and computers.
The appointment will see Modem expand its global network, so it can service HP's global markets in more than 40 countries.
It presently has offices in London, San Francisco, Norwalk in Connecticut, and Frankfurt. Although it once had a far greater presence, Modem closed a number of offices in 2002, including those in Hong Kong, Toronto and Munich. Likely locations for new offices include Paris, Milan and Madrid.
Heike Marquordt, the marketing communications director for HP Technology Solutions, said: "We selected Modem for several reasons. Probably the most compelling was its laser-sharp Web 2.0 vision for HP.
"We're confident it will take us to new levels in interactive initiatives and programmes throughout Europe, the Middle East and Africa."