Web search leader Google Inc. (GOOG) is in exclusive talks to buy a 5 percent stake in Time Warner Inc.'s (TWX) AOL Internet unit for $1 billion, a source familiar with the matter said on Friday.

A deal would shut out Microsoft Corp. (MSFT) , which was seeking its own arrangement.

News of the deal, first reported by the Wall Street Journal, propelled Google shares to a record high.

Under the terms of the proposed deal, which could close within days, Google would continue to provide AOL with its paid search advertising technology for five years, the source said.

The deal would allow AOL to sell display and banner advertising to other Web sites using Google's ad serving technology, the source said.

AOL accounts for from 2 percent to 4 percent of Google's revenue on net basis, analysts have said.

Microsoft had been negotiating to get AOL to use its search technology instead, which would have almost immediately given the software giant a huge presence in its fledgling paid search business.

"AOL would have been a huge opportunity and a natural fit to jump start that business for Microsoft," said independent analyst Richard Greenfield. "If Google has boxed Microsoft out, it begs the question: How is Microsoft going to flourish online?"

Neither Google, Microsoft nor Time Warner spokesmen would comment.

Google, and to a lesser extent Yahoo Inc. (YHOO), have enjoyed dramatic growth in their search advertising businesses over the past year. The companies generate revenue each time a Web user clicks on text advertisements that run alongside Internet search results.

A deal with AOL would set the stage for Google to expand into display advertising, taking dead aim at Yahoo, which is entrenched in both paid search and display advertising. Together the different types of advertising make up a market of roughly $12 billion annually.

"Google has been experimenting with selling display advertising in addition to its paid-search advertising," said Piper Jaffray analyst Safa Rashtchy, who rates Google shares as "outperform." "A deal with AOL will give them a much bigger inventory of potential advertising space."

Early talks with Microsoft centered on putting its online network MSN and AOL together, said another source familiar with the matter, but that was too complex and talks shifted to a joint venture that would include search advertising and display or branded advertising.

Less than two weeks ago, Time Warner Chief Executive Dick Parsons said the joint venture was the way Time Warner wanted to go and terms of the deal changed little between then and its final offer.

The source said, "What did change a lot was the pressure being applied to Time Warner in the course of that time frame," referring to corporate raider turned shareholder activist Carl Icahn, who is leading a group of shareholders advocating a breakup of Time Warner.

Icahn's group, which has a 3.1 percent stake in Time Warner, says the company is worth more in pieces than as a conglomerate.

"It is my belief that, if the proper partner were allowed to have control of AOL, shareholder value would be much more greatly enhanced than through a half-hearted joint venture that might only serve the purpose of entrenching management," Icahn told Dow Jones Newswires on Friday.

AOL is seen is a critical swing factor on search technology traffic among Internet media rivals Google, Microsoft and Yahoo, just as it once was on online advertising, a category it practically invented in the early 1990s.

AOL made surfing the Internet and chatting online a household phenomenon. But it has been a drag on Time Warner's stock as it has lost millions of dialup Internet subscribers since the merger of America Online and Time Warner in 2001.

Since then, the Dulles, Virginia-based unit has focused on providing free programming and services to boost online advertising revenue.

Time Warner has acknowledged in the past that one of the key missing components of its Internet strategy was a paid search component.

Time Warner shares were up 16 cents to $18.00 at the close of New York Stock Exchange trading. Google shares were up $7.62, or 1.8 percent, at $430.15 on Nasdaq. Microsoft shares fell 2 cents to $26.90 on Nasdaq.