Hewlett-Packard Co.'s ousted chairwoman said it was her duty to stem boardroom leaks of sensitive information and that her decision to initiate an investigation was made in concert with others at HP, according to prepared testimony released by a congressional committee.

Patricia Dunn said she "never doubted" the legality of the methods used in the investigation, and that she discussed the conduct of the probe with the technology company's CEO, Mark Hurd, and board members — getting a clear impression that the directors were satisfied with it.

"I never doubted ... that what they were doing was legal," Dunn said in written testimony prepared for her appearance Thursday at a hearing by the House Energy and Commerce Committee. It was released by the panel late Wednesday.

She was referring to the probe led by Ronald DeLia, the operator of a private detective firm, whom Dunn said was used because he was under contract to HP. The investigation involved private eyes impersonating HP board members, employees and journalists to obtain their phone records, spying on targeted people and their relatives, sifting through their garbage, and using an e-mail sting to dupe a reporter.

"I asked Mr. DeLia at every point of contact for his representation that everything being done was proper, legal and fully in compliance with HP's normal practices," Dunn said.

Dunn disclosed that she learned in the spring of 2005 that the probe involved obtaining access to phone records.

The House committee is exploring a scandal that has roiled Silicon Valley's largest and oldest technology company, brought federal and state criminal probes, and claimed Dunn, two directors and two high-level employees. California's attorney general has said he has enough evidence to indict HP insiders and contractors.

Hurd, whose testimony for the hearing also was made public Wednesday, again apologized to those whose privacy was violated in the cloak-and-dagger investigation conducted from early 2005 through last spring.

"How did such an abuse of privacy occur in a company renowned for its commitment to privacy? It's an age-old story. The ends came to justify the means," he said.

Hurd said Dunn had informed him of the existence of the investigation, "but I was not involved in the investigation itself."

Newspaper reports last week, based on internal company documents, indicated that Hurd — the man who engineered HP's recovery — knew more about the leak probe than previously thought.

According to Dunn's testimony, Hurd "was included in perhaps two or three meetings ... to review key milestones and provide his own input on the priority and motivations behind the investigation."

"Neither Mr. Hurd nor I designed or implemented the investigative techniques," Dunn said. "However, we both were made aware of a 'sting' operation that the investigators proposed."

Dunn, for her part, said she initiated the probe "in response to directors who urged me to take more serious action in response to leaks. I turned to resources that HP normally used to do this type of work."

"I was a director of the company, not an officer or employee, and had no authority to enter into contracts, approve invoices or handle any similar matters," Dunn said in her lengthy and detailed recounting of events.

She said she had assumed that Bob Wayman, HP's acting CEO, chief financial officer and director of administration in early 2005 — with ultimate authority to approve spending for corporate security — "had provided authorization for whatever work was undertaken."

Company executives say there were two phases to the leak investigation: the first from early 2005 through last November — which Hurd said yielded "inconclusive" results — and the second, prompted by new leaks to the media, from January through May of this year.

Five private investigators who allegedly served as the foot soldiers in the company's efforts to identify the source of leaks have been ordered to testify at Thursday's hearing. The subpoenas, announced Wednesday, were the second batch issued by the Energy and Commerce Committee. The private eyes are believed to have masqueraded as journalists, HP directors and employees to obtain their phone records. Last weekend, two HP employees and DeLia, who runs Security Outsourcing Solutions Inc. of Needham, Mass., were ordered to appear.

Besides Dunn and Hurd, who succeeded her as chairman on Friday, General Counsel Ann Baskins also has agreed to appear at the hearing. Also expected to appear is Larry Sonsini, HP's outside lawyer and one of Silicon Valley's most influential figures, who assured company executives of the legality of the spying probe.

The five private eyes summoned to appear are believed to have acted as "pretexters" who got phone records under false pretenses. They are Bryan Wagner of Littleton, Colo.; Charles Kelly of CAS Agency in Villa Rica, Ga.; Cassandra Selvage of Eye in the Sky Investigations, Dade City, Fla.; Darren Brost of Austin, Texas, and Valerie Preston of InSearchOf Inc., Cooper City, Fla.

Wagner told an investigator that he had destroyed his computer with a hammer, The Wall Street Journal reported in Wednesday's editions, citing an anonymous person familiar with a probe of the HP case.