The chairwoman of the world's second-largest personal computer maker has agreed to resign, in connection with a corporate scandal that has sparked federal and state investigations.

In a statement issued Tuesday, Hewlett-Packard said Patricia Dunn will step down at a board meeting in January. It said Mark Hurd, the company's chief executive officer and president, will succeed Dunn.

The pressure on Dunn to resign has intensified in recent days, following the disclosure that she hired outside investigators to obtain the phone records of reporters and members of the board of directors. She hired the investigators to find out the source of media leaks regarding Hewlett-Packard.

Federal and state prosecutors are looking into the case, saying the private investigators may have used illegal methods in their probe.

Shares of the company's stock rose on the news Tuesday. Analysts say the scandal will not hurt demand for the company's computers and printers.