Yahoo Inc has struck a deal to buy BlueLithium, the fifth-largest U.S. online ad network, for $300 million in cash, in the latest move to consolidate the fast-growing behavioral ad targeting market.

BlueLithium is a three-year-old company whose technology tracks consumer behavior as users move from site to site, allowing businesses to deliver more relevant ads. A consumer shopping for environmentally friendly products might see ads for hybrid cars a week later.

The deal, announced on Tuesday, bolsters Yahoo's existing behavioral ad-targeting efforts with its 250 million-strong base of Yahoo Mail users and Yahoo Travel, an analyst said.

BlueLithium is an invitation-only network of roughly 1,000 sites that adds to Yahoo's growing ad network. Besides Yahoo's own properties such as news, sports and travel, other parts include the Yahoo Publisher Network of affiliated sites and Right Media Exchange, which reaches a wider range of sites.

The venture capital-backed firm based in San Jose, California, serves up ads to 145 million unique visitors a month, the companies said, citing data from online measurement firm comScore Inc. BlueLithium is No. 5 among U.S. online ad networks and the second-largest in Britain.

This really gives us the ability to (deliver) more relevant advertising to consumers not only on the Yahoo network but also off the network, Todd Teresi, senior vice president of the Yahoo Publisher Network, said in a phone interview.

The deal comes a little over a month after Time Warner Inc's AOL LLC unit said it would buy Tacoda Inc, paying $275 million in cash, according to a source close to the deal.

Both companies use so-called cookie technology, small data files that record the Web surfing habits of different types of consumers, allowing advertisers to target more specific types of ads based on different types of audience demographics.

By tracking consumer behavior over time, such ad networks allow Web sites to deliver fewer, more relevant ads to reach audiences than older online advertising approaches that track behavior on a single site or based on keyword search terms.

The goal over time is for consumers to only get pinpointed ads, Emily Riley, an advertising analyst at JupiterResearch said of the promise of behavioral targeting.

BlueLithium connects marketers like FTD.com, Gevalia Kaffe or The New York Times to online customer segments like online poker players and lonely hearts or does geographic targeting based on zip codes or top metropolitan regions.

In July, BlueLithium reached nearly 120 million users, or two-thirds of the U.S. online audience, ranking behind AOL's Advertising.com, ValueClick Inc, Google Inc's joined to help fund the company's expansion into Britain.

Evercore Partners Inc served as financial adviser to BlueLithium on the deal.