Hewlett-Packard Co. agreed to pay $100 million out of insurance proceeds to settle a lawsuit filed by shareholders who claimed they lost money in the botched takeover of Autonomy Corp., according to court papers.

The money will be used to compensate those who bought Hewlett-Packard shares from Aug.19, 2011, to Nov. 20, 2012, the company said in a statement Tuesday.

The $10.3 billion takeover of Autonomy in 2011 led to an $8.8 billion write down in 2012 over alleged accounting improprieties at the U.K. software maker and spawned a series of lawsuits.

The shareholder agreement, subject to approval by a federal judge in San Francisco, was reached after negotiations with lead plaintiff PGGM Vermogensbeheer BV, in part to avoid “burdensome and protracted” litigation, Hewlett-Packard said.

“Due diligence is really at the heart of the case here. That’s where it all went completely wrong,” Femke Hendriks, counsel at PGGM, said in a phone interview. “We welcome everything that’ll lead to an improvement in governance, risk management and due diligence processes.”

The case is In re HP Securities Litigation, 12-cv-05980, U.S. District Court, Northern District of California (San Francisco).