Hewlett Packard has confirmed plans to exit PCs, tablets and phones, in order to refocus on software.
The company has also agreed to buy UK software firm Autonomy for �6.2bn ($10.3bn), or 2550p per share.
Shares in HP spiked as rumours - now confirmed by HP - broke.
HP also said it was considering a sale of its personal systems group, which includes the world's biggest PC-making business, and that it will discontinue its webOS devices.
The webOS operating system is used in its tablet computers and smartphones.
The move marks a significant U-turn for the company, which announced in a March strategic review that it would integrate webOS into all of its future hardware.
HP had launched its Pre tablet computer as a competitor to the iPad and devices based on Google's Android operating system.
However, webOS failed to gain traction with reviewers, or with operators and retailers.
Mark-upAutonomy's board has accepted HP's offer to buy the firm, and founder Mike Lynch, who owns 8.2% of the stock, has pledged to vote for the deal.
The UK firm was founded by researchers at Cambridge University, and specialises in pattern-recognition technologies.
Mike Lynch told the BBC: "HP understands the special culture we have. This is about building Autonomy. It will be a positive thing for Cambridge and the UK."
The agreed price of 2550p represents a 78% mark-up on its closing price in London on Wednesday of 1429p.
It is equivalent to 47 times the pre-tax profits earned by Autonomy in the 12 months to June this year.
As news of the acquisition and strategic shake-up leaked out, HP briefly went from being the worst performer in the Dow Jones Industrial Average index of leading shares, to the only gainer at lunchtime.
The company's share price jumped 15% as the news broke on the Bloomberg newswire, before giving up nearly all of the gains as trading progressed into the afternoon.
HP's shares eventually ended the day 7.6% down, confirming it as the worst performer on what was a dreadful day for the markets.
That came on top of a 3.9% fall on Tuesday that was prompted by a warning from rival Dell that it expected demand in the US market to weaken in the coming months.
The news follows long-running rumours that chief executive Leo Apotheker, who recently joined from German rival SAP, wanted to refocus the company away from its traditional hardware business towards its smaller but much more profitable software lines.
On the sale of its PC business, HP said it "will consider a broad range of options that may include, among others, a full or partial separation... from HP through a spin-off or other transaction".