Yahoo Inc. (YHOO) said Thursday it has struck a deal with Hewlett-Packard Co. (HPQ) to plant its Internet search engine on millions of computers, the latest volley in a high-stakes battle with Google Inc. (GOOG) and Microsoft Corp. (MSFT)

The alliance unites two companies trying to catch up to the longtime leaders in their respective fields.

Sunnyvale-based Yahoo ranks a distant second to Google in the lucrative search engine market, while Palo Alto-based HP continues to trail Dell Inc. (DELL) in personal computer sales despite recent gains.

• Click here to visit FOXNews.com's Home Computing Center.

The agreement requires HP to set up its desktop and notebook PCs in North America so Yahoo's search engine appears in the toolbar of Microsoft's Internet Explorer 7, the next version of the Web's most widely used browser.

Yahoo is hoping that the tool bar will generate more search requests, providing a springboard for more ad revenue.

Mountain View-based Google and Round Rock, Texas-based Dell teamed up in a similar partnership announced four months ago.

Yahoo didn't disclose how much it will pay HP to spotlight its search engine — a detail that Google also left out in its Dell deal.

For PCs sold in Europe, HP will program the settings so Yahoo will be the automatic home page.

Microsoft is counting on the next version of its Windows operating system, due out early next year, to help it become a bigger factor in search engine advertising.

Google and Yahoo are hoping their respective deals with the world's top PC makers will help them counter any advantage that Microsoft may get from its updated operating system.

Although Yahoo remains the Web's most trafficked destination, the company hasn't been able to narrow Google's huge lead in Internet search — a factor that has crimped its earnings growth and battered its stock this year.

The company already has warned its revenue for the current quarter will fall below Wall Street expectations.

Through August, Google held a 44 percent share of the U.S. search market followed by Yahoo at 29 percent and Microsoft at 12.5 percent, according to comScore Media Metrix.

On other fronts, Yahoo's long-standing position as the most-viewed Web site is being challenged by News Corp.'s (NWS) MySpace.com, a social-networking destination catering to teens and young adults.

To counter the threat, Yahoo is rumored to be exploring a possible acquisition of Facebook.com, the second-ranked social-networking site, for between $800 million and $1 billion.

HP, the world's largest technology company, is grappling with its own problems.

Determined to plug a boardroom leak, HP authorized a probe that relied on a ruse to dig up the personal phone records of at least 18 people. The deception triggered a scandal that is now the subject of criminal and congressional investigations.

Before the companies announced their partnership, Yahoo's shares gained 68 cents Thursday to close at $25.33 on the Nasdaq Stock Market while HP's shares rose 58 cents to finish at $35.97 on the New York Stock Exchange.

FOXNews.com is owned and operated by News Corporation, which also owns and operates MySpace.com.