Hewlett-Packard Co. (HPQ) agreed Thursday to pay $14.5 million to settle a lawsuit brought by state Attorney General Bill Lockyer accusing the company of unfair business practices in its crusade to unmask the source of boardroom leaks to the news media.

The vast majority of the settlement — $13.5 million — will fund state and local investigations into privacy rights and intellectual property violations, Lockyer said in a statement as the lawsuit and settlement were filed in Santa Clara County Superior Court.

"Fortunately, Hewlett-Packard is not Enron," he said. "I commend the firm for cooperating instead of stonewalling, for taking instead of shirking responsibility, and for working with my office to expeditiously craft a creative resolution."

The remainder consists of $650,000 in civil penalties and $350,000 to cover the state's investigation and other costs.

HP has also agreed to various governance reforms, which Lockyer said will help protect privacy rights during any future HP investigations.

The lawsuit marks the first civil case brought by authorities against Palo Alto-based HP for the scandal that erupted in September and led to criminal charges against former chairwoman Patricia Dunn and four others.

Prosecutors said the company hired outside detectives who tricked phone companies into disclosing the private phone records of directors, journalists and others so the company could track the source of news leaks.

Revelations of the probe, disclosed in a regulatory filing, led to an exodus from the board, criminal charges, a congressional investigation, and ongoing federal probes by the FBI, the Securities and Exchange Commission, federal prosecutors and other agencies.

Dunn, who was ousted over the incident, former ethics chief Kevin Hunsaker and three outside investigators, Ronald DeLia, Matthew DePante and Bryan Wagner, have pleaded not guilty in Santa Clara County Superior Court to charges of identity theft and fraud for their roles.

The company's stock price has been relatively unaffected by the scandal, buoyed by strong earnings growth under CEO Mark Hurd and the belief that the turmoil had little affect on operations.

HP shares closed down 28 cents to $39.86 Thursday on the New York Stock Exchange before the settlement was announced.