Google will issue stock worth some $300 million or more to settle a simmering dispute with rival Yahoo! (YHOO) .

The search engine giants said Monday they settled two major disagreements with a deal that will give Yahoo! 2.7 million Google common shares.

That stock would be worth between $292 million and $365 million, based on the offering price range Google estimated in a recent filing. Google filed in April for a closely watched initial public offering that Wall Street expects to take place as soon as next week.

Monday's agreement, disclosed in a Google filing with the

Securities and Exchange Commission

, settles litigation over patents held by Yahoo's Overture Services subsidiary, as well as a disagreement over Google shares issuable to Yahoo! in connection with a warrant held by Yahoo!.

Under the terms of the agreement, Overture will license certain of its patents to Google, and Google will issue additional shares to Yahoo! to settle the warrant dispute and the patent lawsuit, and in payment for the patent license.

"We are pleased to have resolved these issues, and with the terms of this agreement," a Google spokesman said Monday.

Google has said in previous filings that Yahoo! held 5.5 million shares, 550,000 of which it planned to sell in Google's upcoming public offering.

As part of Monday's agreement, Yahoo! is tripling the number of shares it plans to sell in Google's IPO, to 1.6 million. Yahoo!'s move will have the effect of increasing the size of the offering to 25.7 million shares from 24.6 million, though the proceeds to Google won't be changed.

A Yahoo! spokeswoman declined to discuss how many of the 2.7 million shares the company was receiving were in compensation for the patent dispute, and how many were related to the warrant disagreement.

As for why the company had upped the number of shares it was selling in the Google offering, she said, "The company made a decision to liquidate a portion of its holdings," adding that Yahoo! would monitor the performance of the remaining shares over time.

The news comes as Wall Street, dealing with its annual August dog days, fills a news vacuum with rumblings that Google's IPO is facing weak demand and will have to be made more attractive to supposedly value-obsessed investors.

Google said in its filing that the settlement will cause the company to post a loss for the quarter ending Sept. 30. Dragging down the numbers, says Google, will be a noncash charge of between $260 million and $290 million, a range based on the assumption that the company's shares will be valued at the midpoint of its proposed IPO price range of $108 to $135 per share.

Additionally, says Google, the noncash charge -- including, among other items, the value of the shares associated with the settlement of the warrant dispute -- will result in an estimated third-quarter income tax benefit of beween $100 million and $115 million.

Yahoo!'s shares were trading at $25.66 Monday, down 36 cents.