Hewlett-Packard (HP) stunned Wall Street by alleging a massive accounting scam at its British software unit Autonomy that will cost the company the majority of $8.8 billion in charges.

It was the latest in a string of reversals that have renewed questions about the basic competence of the storied company's board and senior managers.

HP said on Tuesday it discovered "serious accounting improprieties" and "a willful effort by Autonomy to mislead shareholders," after a whistleblower came forward following the ouster of Autonomy's then-chief executive, Mike Lynch, in May.

The charge follows a nearly $11 billion writedown last quarter for the company's EDS services division.

The technology company has been roiled in the past few years by a revolving door of CEOs, overall management turnover and challenges in its core personal computer and printer businesses.

HP's stock slid to a 10-year low, dropping 12 percent to $11.71 in regular trading on Tuesday. Shares are down nearly 50 percent year to date.

Lynch "flatly rejected" HP's allegations and said he was "shocked" but confident he would be absolved of any wrongdoing.

He had not been notified by HP about the allegation before it was made public, nor had he been contacted by any authorities, Lynch said in an interview with Reuters.

HP took $8.8 billion in charges in the quarter, with $5 billion tied to the problems at Autonomy. The rest of the charge related to the "recent trading value of HP stock and headwinds against anticipated synergies and marketplace performance," HP said.

HP said it has referred the matter to the U.S. Securities and Exchange Commission's enforcement division and the UK's Serious Fraud Office for civil and criminal investigation. It said it would take legal action to recoup "what we can for our shareholders."

Both agencies declined to comment.

HP Chief Executive Meg Whitman, who voted for the deal while she was on HP's board, said the investigation of Autonomy's finances - both external and internal - will take multiple years as it makes it way through the courts in both countries.

"Most of the board was here and voted for this deal, and we feel terribly about that," said Whitman on a call with analysts. "The board relied on audited financials, audited by Deloitte. Not Brand X accounting firm, but Deloitte," she said, adding that KPMG was hired to audit Deloitte.

"Neither of them saw what we now see after someone came forward to point us in the right direction," Whitman said.