The seemingly never-ending HP-Autonomy saga took another turn Monday night when Hewlett-Packard ( s hpq)and two law firms representing shareholder groups agreed to settle their differences and they can now work together to pursue legal action against former Autonomy CEO Mike Lynch (pictured below) and CFO Shushovan Hussain.

To  recap this tortuous tale, HP under then CEO Leo Apotheker, agreed to buy Autonomy in 2011 for more than $11 billion in a deal that was controversial even before it was formally announced -- news of it leaked in advance.  Apotheker left the company within a year and his successor Meg Whitman alleged in November 2012 that Autonomy -- including Lynch -- misrepresented the size of its business and engaged in bad accounting practices -- essentially duping HP into overpaying. HP also pushed U.K. and U.S. authorities to investigate Autonomy for fraud. 

Former Autonomy CEO Mike Lynch

Former Autonomy CEO Mike Lynch

The shareholder groups in turnthen  charged that HP management, including Whitman, didn't perform due diligence in ferreting out Autonomy's problems earlier than it did.

The agreement hammered out in mediation under retired U.S. District Judge Vaughn R. Walker means that the plaintiffs and their legal firms Cotchett, Pitre & McCarthy, LLP, and Robbins Geller Rudman & Dowd LLP will now help HP bring claims against Lynch, Hussain and potentially others. And -- a positive for HP -- all claims against its current and former directors -- "other than legacy Autonomy officials and advisors" will be dismissed.

Lynch has repeatedly denied allegations of wrong doing.

In addition, HP agreed to adopt better policies for vetting potential mergers and acquisitions.

News of these settle ment talks surfaced in a Reuters report on Friday.