The business is understood to be worth around £10 million and involves marketing across all HP business units, including consumer, small- to medium-sized business and large enterprise. The display advertising element will involve campaigns scheduled to appear on Google.
The account was previously shared between Modem and ZenithOptimedia's digital ag-ency Zed Media, which also pitched for the business.
Norm Johnston, the managing director of Modem Media London, said: "HP's decision is recognition that they are taking search marketing seriously and want to do more than bid management. They highlighted that they were looking for a strategic partner that can make search a critical part of the marketing mix."
Search takes an increasing proportion of digital marketing spend every year. Clients spent around £200 million on search in the first half of 2005, according to the Internet Advertising Bureau.