Fresh from a failed courtship with Microsoft, Yahoo on Thursday rushed into Google's arms in the hope an alliance will improve its sagging fortunes and quell a rebellion by stockholders.
Yahoo and Google announced a deal to put the Internet search king's expertise to work pumping money from advertising posted next to Yahoo Internet search results.
Google and Yahoo began discussing an alliance in early February, shortly after Microsoft offered to buy Yahoo, said Google chief executive Eric Schmidt.
"The most entertaining conversations were those that took place in buildings that Yahoo owns in unknown and unfindable locations," Schmidt said during a conference call with analysts and reporters.
Google co-founder Larry Page and other executives arrived on bicycles for clandestine meetings in covert locations, Schmidt added.
Schmidt said it was during the past few weeks that he and Yahoo chief executive Jerry Yang had "serious conversations" and teams spent sleepless nights pulling together a deal inked Thursday.
Google co-founder Serge Brin said it is "very exciting" to be working with Yahoo and its founders David Filo and Yang, whose time as students at Stanford University overlapped that of Brin and Page.
"We share quite a history and culture," Brin said. "It was David Filo and Jerry Yang that encouraged us to start a company that, in turn, became Google."
Brin said a priority is ensuring that Yahoo remains "a strong independent company."
Yahoo hopes the alliance will appease stockholders angry that board members rejected Microsoft's bid, which offered an attractive premium on the market value.
Billionaire corporate raider Carl Icahn has been amassing Yahoo shares in a campaign to overthrow the Yahoo board for rejecting a Microsoft takeover.
"This agreement provides a source of funds to both deliver financial value to stockholders from search monetization and to invest in our broader strategy," said Yahoo president Sue Decker said.
The deal gives Yahoo "the opportunity to deliver more relevant ads to users and provide advertisers and publishers with better advertising technology to help them succeed," Schmidt said.
"This agreement will preserve the competitive and dynamic online advertising space."
The deal also breaks down the wall between free instant messaging services offered by Yahoo and Google, meaning users of either service will be able to chat online with each other in a way not possible before.
The alliance focuses on text ads posted alongside Yahoo online search results but has the potential to expand to include display advertising.
The deal is limited to Yahoo web properties in the United States and Canada, but Google said there is potential to extend it to other parts of the world.
In a move evidently crafted to address anticipated anti-trust concerns, the agreement frees Yahoo to also display paid search results from other third parties and its own Panama ad platform.
While searching for a "white knight" to save it from Microsoft's clutches, Yahoo tested using Google's AdSense for Search service for two weeks in April.
Microsoft offered to buy Yahoo for $44.6 billion in stock and cash on January 31, but withdrew the offer on May 3, saying Yahoo refused to budge despite the software giant upping its bid to nearly $50 billion.
The test showed that Google's methods generated more money than Yahoo's advertising platform.
Microsoft was enraged by the experiment and warned that a Yahoo-Google partnership raises anti-trust concerns because it would cover some 90 percent of online advertising.
Microsoft has significantly ramped up its representation with US legislators and will fiercely fight an alliance by the top two players in the Internet search advertising market, according to Silicon Valley analyst Rob Enderle.
"They believe if Yahoo and Google do this, they can let loose the dogs of antitrust war on Google," Enderle said.
Google general counsel Kent Walker said the deal requires no regulatory approval but that the company will discuss it with regulators because it is so "high profile."