Around the turn of the century, Autonomy Corporation was one of the darlings of the UK technology industry, specializing in knowledge management and enterprise search. It went on an acquisition spree in the early 2000s, driving up its revenue, before being swallowed itself by Hewlett-Packard in 2011, in a deal that valued it at over $10 billion. But this rags-to-riches tale has a tragic ending.

In fact, the HP acquisition of Autonomy probably ranks among the most notorious failed mergers and acquisitions. And although former Autonomy CEO Mike Lynch was ultimately found not guilty of fraud in the US, he was unable to savor his victory for long. No sooner had the acquisition closed than revenue began to flag, prompting an internal investigation in which HP uncovered signs of past creative accounting at Autonomy.

Rather than selling software to customers, HP said, Autonomy had been selling them hardware at a loss, then booking the sales as software licensing revenue. That discovery forced HP to write down the value of Autonomy by more than $5 billion, triggering a wave of shareholder lawsuits. HP in turn sued Lynch in a UK court, and the U.

S. Department of Justice launched a criminal investigation. The court found in favor of HP in the UK, where lawyers are still arguing about damages, but the of the DOJ’s wire fraud charges.

And just two months later, while partying with family and friends to celebrate his court victory, Lynch died in a tragic boating accident. Here’s how i.