Hewlett-Packard Co's former chief executive officer Mark Hurd has reached a legal settlement with the woman who accused him of sexual harassment, and she has also agreed to release HP from legal claims, according to sources familiar with the matter.

The world's No. 1 computer maker stunned Wall Street and Silicon Valley on Friday by announcing Hurd's resignation, accusing him of falsifying expense reports to conceal a close personal relationship with a female contractor.

The unidentified woman told HP's board in June that Hurd had sexually harassed her, but an investigation found no violation of the company's sexual harassment policy, HP said.

The contractor, who did marketing work for HP from 2007 to 2009, did not have sexual relations with Hurd, according to her lawyer Gloria Allred, a high-profile attorney who often works with celebrity clients.

Mark has settled the matter with the woman, said one source who was briefed on the matter. This person said the settlement included a payment, but the amount was not disclosed.

Another source with knowledge of the matter said HP was given a release by the contractor, and that the company had not paid her any money. This person also said Hurd had settled the matter. Both sources spoke on condition of anonymity.

Allred declined to comment.

According to sources, the contractor helped plan, market and host events for the office of the CEO. She made the sexual harassment charges on June 29 in a letter addressed to Hurd that came to his office.

The board then ordered an investigation, which found inaccurate expense reports filed by Hurd or on his behalf, and instances where the contractor received compensation for no legitimate business purpose, HP has said.

DISPUTED EVENTS

HP said Hurd's actions, while trivial in financial terms, represented a systematic violation of the company's trust and ethical standards -- serious enough to oust a charismatic and widely admired executive credited with resuscitating HP.

Hurd himself, who is 53 and married with two children, said in a statement on Friday that he had not lived up to his own standards of integrity. He could not be reached for comment.

The details surrounding Hurd's expense account improprieties are in dispute.

Some close to HP's board have portrayed Hurd's various meetings with the contractor as highly unusual for the CEO of a $100 billion company. But others close to Hurd's camp say the two were business acquaintances whose meetings were completely above board, and that Hurd never tried to conceal them.

According to sources, the woman was interviewed twice by Hurd, in August and September of 2007, prior to being hired.

The first time was in Los Angeles. For the second interview, the woman was flown to Denver, where Hurd was staying, and the two dined together.

After she was hired, the contractor worked at more than a dozen events in a number of different locales, some overseas. After these events, she often had dinner with Hurd.

However, the expenses submitted by Hurd in some instances did not reflect her being there. Instead, they stated that he dined alone, or in some cases with his bodyguard, said one of the sources familiar with HP's investigation.

This person said on a couple of occasions, the contractor was paid fees and travel expenses to attend an event where none was held, but at a location where Hurd was staying.

A source familiar with Hurd's account of the situation, said there were expense irregularities, in part because Hurd's expenses were filed by his assistant, who did not necessarily know who was in attendance at a certain meal.

This person maintained that the woman did sometimes appear on expense reports, and sometimes Hurd paid for the meals himself, if no business was discussed.

On one occasion, the woman was paid for an event that never took place because Hurd got sick and the event was canceled at the last minute, this source said.

Hurd offered to reimburse the company for the expenses, which amounted to no more than $20,000 over a two-year period, the source said.

News of Hurd's resignation sent HP shares plunging 10 percent as he was one of the most respected executives in Silicon Valley. Chief Financial Officer Cathie Lesjak will take over while HP looks for a permanent CEO.

Hurd, who received nearly $100 million in compensation over the past three years, will get a severance payment of $12.2 million from HP.

(Reporting by Gabriel Madway; Editing by Tiffany Wu and Eric Walsh)