NEW YORK — Hewlett-Packard said Thursday it had named Meg Whitman, the former eBay chief, as president and chief executive officer, replacing Leo Apotheker at the world's biggest computer maker.

"We are fortunate to have someone of Meg Whitman's caliber and experience step up to lead HP," said Ray Lane, who was named executive chairman of the computer giant. "We are at a critical moment and we need renewed leadership to successfully implement. Meg is a technology visionary with a proven track record of execution."

Whitman stepped down in 2008 at eBay, the Internet auction giant, and last year made an unsuccessful run for California government.

Among the changes at HP, Ray Lane has moved from non-executive chairman to executive chairman of the board of directors, and the board intends to appoint a lead independent director, a company statement said.

"These leadership appointments are effective immediately and follow the decision that Leo Apotheker step down as president and chief executive officer and resign as a director of the company," the California group said.

In the statement Whitman said, "I am honored and excited to lead HP. I believe HP matters -- it matters to Silicon Valley, California, the country and the world."

Apotheker, a veteran of German business software giant SAP, took over HP in November and has been refocusing the company on software and cloud services -- offering applications and storing data over the Internet.

HP shares have fallen more than 40 percent since Apotheker replaced Mark Hurd, who resigned following a sexual harassment accusation.

HP shares plunged 20 percent on a single day last month after Apotheker announced a dramatic strategic shakeup at the world's top personal computer maker that includes spinning off its PC business.

HP announced on August 18 it was exploring a spin-off of its PC unit and buying British enterprise software company Autonomy for $10.24 billion as it refocuses on software and technology solutions.

In a further move away from the consumer space, HP said that it was stopping production of its TouchPad tablet computer, its rival to Apple's iPad, and phones based on the webOS mobile operating system acquired from Palm last year for $1.2 billion.

HP began laying off employees in its webOS unit on Tuesday.