(Reuters) - Diamond Foods Inc (>> Diamond Foods, Inc.) agreed to settle an investor lawsuit related to an accounting scandal for about $100 million, much less than the damages estimated by the lead plaintiff.

The Emerald Nuts and Kettle Chips maker, whose shares rose 20 percent, also forecast higher-than-expected fourth-quarter sales.

The company said it will pay $11 million in cash and issue 4.45 million common shares to a fund to settle the lawsuit involving improper accounting of payments to walnut farmers.

The settlement was valued at about $109 million when the terms were negotiated, according to court documents, but was worth about $96 million based on Diamond stock's closing price on Tuesday.

"The greater clarity related to the timing and magnitude of the lawsuit should increase DMND's ability to address capitalization issues," BMO Capital Markets analyst Kenneth Zaslow said in a note.

Diamond has been struggling to get past the scandal that stumped its planned $2.35 billion purchase of Pringles from Proctor & Gamble (>> The Procter & Gamble Company) and claimed the jobs of its two top executives.

The scandal also led to restatements that wiped out $56.5 million in profit from fiscal 2010 and 2011.

The settlement amount, subject to court approval, represents about 25-40 percent of what the lead plaintiff saw as the maximum damages recoverable in the case, the documents said.

The lead plaintiff estimated that Diamond, whose long-term debt stands at $579 million, would not be able pay the original amount demanded should the company lose the trial.

The plaintiff's assessment was also complicated by the fact that the primary currency in any settlement would be Diamond's shares, and any harsh settlement could hurt the stock's value and possibly bankrupt the company.

Diamond had cash and cash equivalents of $7.2 million as of April 30, 2013, according to a regulatory filing.

The company said on Wednesday it denies any wrongdoing related to the claims, which were made on behalf of investors who bought the stock between October 5, 2010 and February 8, 2012.

Diamond also forecast sales of $196 million to $201 million in the fourth quarter. Analysts on average were expecting $187.4 million, according to Thomson Reuters I/B/E/S.

The company's shares, which have risen about 40 percent this year until Tuesday closing, rose to a year-high of $23.38 on the Nasdaq on Wednesday afternoon.

The case is in re: Diamond Foods Securities Litigation, U.S. District Court for the Northern District of California, No 3:11-cv-05386.

(Reporting by Chris Peters in Bangalore; Editing by Don Sebastian)

Stocks treated in this article : The Procter & Gamble Company, Diamond Foods, Inc.