Tech giant Hewlett-Packard Co. is buying Compaq Computer Corp. for about $21 billion in a blockbuster merger that should shake up the struggling computer industry -- and will leave as many as 15,000 people out of a job.

``It is not our intention to lose momentum in the marketplace, but in keeping with being realistic, we think it will be possible to see some revenue loss in '02 and '03,'' HP chairwoman and chief executive Carly Fiorina said in a conference call.

The deal ``vaults us into a leadership role with customers and partners — together we will shape the industry for years to come,'' Fiorina said.

HP chief financial officer Bob Wayman said he expected the revenue decline would be less than 5 percent, and that earnings will get a boost of 20 percent or more by 2003.

Both Palo Alto-based HP and Houston-based Compaq have been hurt by technology sector downturns in the past year and each company imposed layoffs to deal with shrinking profits.

A Compaq spokesman said the two firms were cutting 15,000 jobs but declined to give details.

The deal offered a premium of about 19 percent on Compaq based on Friday's stock prices, but that premium, like the price of the deal, sank with the fall in HP stock. Originally seen at some $25 billion, the value of the deal sunk to just over $21 billion by mid-day on Tuesday.

The merger creates a behemoth with 130,000 employees and $87 billion in revenue — about the size of IBM Corp. — with products not only in the personal computer business but also in computer servers, printers and high-tech services.

The company will still be called Hewlett-Packard and will keep its headquarters in Palo Alto, though it will have a substantial presence in Houston. HP's Fiorina will keep her posts at the merged company. Compaq's chairman and chief executive, Michael Capellas, will be president.

Compaq and HP are Nos. 2 and 4 in worldwide PC sales, but their combined total would surpass leader Dell Computer Corp., according to the most recent figures from Gartner Dataquest. Compaq ranks first in worldwide server sales, while HP is fourth.

After the merger closes, which is expected to happen in the first half of 2002, the new HP will be 64 percent owned by HP shareholders and 36 percent owned by Compaq shareholders. Capellas and four other Compaq directors will join HP's board.

``It's an extremely strong match for both firms, particularly at the executive level with Fiorina and Capellas,'' said analyst Rob Enderle of Giga Information Group. ``She's more of the charismatic visionary, he's more of the operations person. The two of them together should be able to take the combined firm places they couldn't go separately.''

HP and Compaq said the deal would save them $2 billion a year by 2003, but Gartner Dataquest research fellow Martin Reynolds said that won't be easy. Both companies, he said, have long product lines that customers will not want to see phased out.

The deal comes as the computer industry suffers through declining sales — a trend blamed on a saturated market and the slumping worldwide economy. Compaq lost $279 million in the most recent quarter; HP posted a net profit of $111 million in its last quarter, but that marked an 89 percent decline from the previous year.

In June, Capellas outlined a broad reorganization plan bringing Compaq's services division into the forefront in the company's work.

Hewlett-Packard has moved in a similar direction under Fiorina, who has brought about a broad reorganization of the 63-year-old Silicon Valley institution since taking over in 1999. She has come under intense criticism in recent months for repeatedly lowering her forecasts for Wall Street, and some analysts have suggested that HP get out of the PC business, which was a money-loser for the company in the last quarter.

Compaq was founded in 1982 by three executives who left Texas Instruments: Rod Canion, Jim Harris and Bill Murto. They sketched their first product — a portable PC that could run the same software as IBM's new PC — on a paper placemat in a Houston pie shop before presenting it to venture capitalists.

Hewlett-Packard came out of similarly humble origins — it was launched in a Palo Alto garage in 1938 by the late William Hewlett and David Packard with $538 of their own money.

Reuters and the Associated Press contributed to this report.