Google has settled a long-standing patent argument with arch-rival Yahoo and agreed to license several patents from it. At the same time, it also settled a stock warrant dispute with the company.

The cost of all this will be 2.7 million shares in Google given to Yahoo and a charge of between $260 million and $290 million (although offset by a related tax benefit estimated at between $100 million and $115 million). In return, Google gets a perpetual licence to Yahoo's technology.

In particular, it will cover Patent 6,269,361, entitled "System and method for influencing a position on a search result list generated by a computer network search engine". Yahoo - or rather subsidiary Overture Services - sued Google in April 2002, claiming the search engine giant was infringing it without permission.

The stock warrant argument started even earlier, in 2000, when Google issued about 1.2 million shares to Yahoo, but Yahoo said it was entitled to more.

The settlement is good news for Google, however, which is hoping to resolve any lingering legal issues before its proposed IPO. For Yahoo, aside from the money and shares, it could strengthen the company's hand if it pursues patent infringement claims against other companies, said Nate Elliott, an analyst at Jupiter Research.

The charge itself will send Google into a net loss for the quarter, according to SEC filings, although it did not estimate the size of the loss.

The licensing deal comes as the major search providers are moving away from using third-party technology in their services, said Gartner analyst Allen Weiner. Because they want to use search as a critical part of a larger set of offerings, such as music services, they are developing their own technologies. It would be time-consuming and expensive to integrate another company's technology into these other offerings. "The only way you're going to create the ultimate integrated tool is to build it yourself," Weiner said.

When it sued Google in 2002, Overture said the company was infringing on a patent for its pay-for-performance service, which let companies bid for placement in search results based on relevant keywords. Advertisers paid Overture to drive traffic to their sites via search engines. In a response then, Google denied the patent-infringement charge.