Hewlett-Packard Co. (NYSE:HPQ) shocked Wall Street Friday afternoon with the announcement that its chairman and chief executive, Mark Hurd, is resigning immediately in the wake of a sexual harassment investigation that revealed ethics issues.

The company also announced better-than-expected fiscal third-quarter preliminary results and boosted its full-year view after the market closed.

Hurd’s announcement follows an investigation by outside legal counsel regarding a sexual harassment claim by a former contractor against Hurd and the company, according to a release from the company. H-P said there was no violation of its sexual harassment policy, but the investigation did unveil violations in H-P’s Standards of Business Conduct.

“As the investigation progressed, I realized there were instances in which I did not live up to the standards and principles of trust, respect and integrity that I have espoused at HP and which have guided me throughout my career,” Hurd said, in a statement. He went onto say that he had decided to leave the company due to the fact that it would be difficult to “continue as an effective leader at H-P.”

Hurd's departure ends a five-year tenure at H-P, during which time he implemented cost-cutting measures and presided over important acquisitions, including the company's $1.2 billion takeover of mobile handset-maker Palm, Inc. last April.  Hurd's separation agreement includes a $12.2 million severance payment; since 2007, H-P has paid Hurd nearly $100 million in total compensation.

In a conference call following the press release, the company explained that its ethics probe uncovered Hurd's "close personal relationship" with an H-P contractor, hired by his office, and had failed to disclose that relationship.  In an effort to conceal it, Hurd submitted "inaccurate" expense reports, the company said, in an effort to receive compensation and reimbursement for services by that contractor that may have never been performed.

Current chief financial officer, Cathie Lesjak, 51, will take over as CEO in the interim until an appropriate successor to Hurd can be found. Lesjak has removed herself from consideration for the job on a permanent basis; candidates from both inside and outside of the company will be considered for the position, according to the company.

Hurd said H-P was “exceptionally well positioned strategically.”

H-P boosted its full-year outlook, and Lesjak reiterated in the company's conference call that the company's guidance would be no different than if Hurd were still CEO.  

"We thought it was important to announce today to make clear Mark's resignation had nothing to do with the company's performance," Lesjak said.

The laptop and personal tech-company now sees full-year adjusted earnings in the range of $4.49 to $4.51 per share. Revenue is expected to come in between $125.3 billion and $125.5 billion. Analysts had predicted full-year earnings of $4.49 a share on revenue of $124.52 billion.

Third-quarter preliminary results also topped the Street’s expectations. The company weighed in with earnings of approximately 75 cents a share, with adjusted earnings rising to $1.08 per share.
Revenue rose approximately 11%, to $30.7 billion, compared with the year-ago quarter’s sales of $27.45 billion. Analysts had predicted earnings of $1.07 per share on revenue of $30.01 billion.

Shares of H-P fell 5 cents on Friday to close the week at $46.30 a share. The stock plunged $4.57 or 9.89% in after-hours trading.