LM Otero, Associated Press
Hewlett-Packard announced Tuesday it's buying Electronic Data Systems Corp., whose Plano, Texas, offices are seen above. The all-cash deal was $13.2 billion.

SAN FRANCISCO — Riding a hot streak that has doubled its stock price in the past three years, Hewlett-Packard Co. is rolling the dice on a $13.2 billion acquisition of technology-services provider Electronic Data Systems Corp.

The all-cash deal announced Tuesday represents HP's biggest gamble under the leadership of Mark Hurd, who was hired as chief executive in March 2005 to turn around the Palo Alto-based maker of personal computers and printers.

As Hurd relentlessly cut costs while demanding better execution from the company's remaining workers, HP recovered from a nagging financial hangover that was exacerbated by the biggest acquisition in its 69-year history — the $19 billion purchase of Compaq Computer Corp., completed in 2002 over strident shareholder objections.

Now HP will try to show it learned from its mistakes by making the second-largest deal in its history pay off faster.

Investors already are worried that HP is taking an unnecessary risk on EDS, whose disappointing profit margins had caused its stock to drop by about 30 percent over the past year. HP shares sagged $2.56, or 5.5 percent, to finish Tuesday at $44.27.

"It appears to be a very daunting deal," American Technology Research analyst Shaw Wu.

The $25-per-share sale price represents a nice payoff for EDS stockholders, who will receive a nearly 33 percent premium compared to where the company's shares stood before news of the HP talks leaked out Monday. EDS shares added 26 cents to close at $24.34 on Tuesday.

Including EDS' net debt, HP values the acquisition at $13.9 billion. Based on EDS' nearly 530 million common shares, restricted stock units and options, the sales prices works out to $13.2 billion. That represents about one-fourth of the $50 billion increase in HP's market value since Hurd joined the company.

HP prizes EDS because it wants to become a much bigger player in technology services — a wide-ranging category that includes running computer data centers, stitching together software programs and consulting on special projects for business and government clients.

The estimated $550 billion market for technology services has long been dominated by IBM Corp., which has about a 10 percent share. HP ranks a distant fifth with a 3 percent market share, based on its $16.6 billion in technology-services revenue in its last fiscal year.

By picking up EDS' $22 billion in revenue, HP's technology services division will more than double in size and leapfrog into second place with a 7 percent market share. Fujitsu and Accenture will fall behind the combined HP-EDS.

An IBM spokesman declined to comment on the acquisition.

HP has already surpassed IBM as the world's largest all-purpose technology company, based on revenue.

In a sign that Wall Street doesn't view HP's expansion as a major threat in technology services, IBM shares gained $1.34 to close at $126.58 on Tuesday.

The EDS deal is expected to close during the second half of this year and begin boosting HP's earnings in its fiscal year ending in October 2010.

To wring more profit from the EDS takeover, HP indicated it will make significant layoffs as it eliminates overlapping jobs and cuts other expenses. Hurd and EDS CEO Ronald Rittenmeyer declined to estimate how many workers might lose their jobs.

HP already has eliminated about 15,000 jobs since Hurd took control.

"There are obviously going to be some changes," said Rittenmeyer, who will run the combined technology services unit and report directly to Hurd.

The combined services business would have 210,000 employees in more than 80 countries. It will retain the EDS brand and EDS' Plano, Texas, headquarters.