Hewlett-Packard (NYSE:HPQ) tapped former SAP (NYSE:SAP) chief Leo Apotheker for its vacant CEO spot on Thursday as the world’s largest tech company by revenue looks to turn the page on its controversial ouster of Mark Hurd.

H-P, which has been searching for a new CEO for three weeks, also named Ray Lane, a former Oracle (NASDAQ:ORCL) president and chief operating officer, as its new non-executive chairman of the board.

Apotheker spent more than 20 years at SAP, including a tenure as the business software maker’s CEO. He’s credited with transforming SAP’s research and development operations and its technology platforms.

“Leo is a strategic thinker with a passion for technology, wide-reaching global experience and proven operational discipline -- exactly what we were looking for in a CEO," Robert Ryan, lead independent director of H-P’s board, said in a statement. "After more than two decades in the industry, he has a strong track record of driving technological innovation, building customer relationships and developing world-class teams."

Apotheker succeeds Cathie Lesjak, H-P’s chief financial officer who took over on an interim basis after Hurd left the company. Hurd was pushed out in the wake of an ethics scandal that shocked Silicon Valley and recently joined Larry Ellison at Oracle.

Lesjak, who wasn’t considered a candidate for the top job, is expected to continue serving as CFO and a member of H-P’s executive committee.

H-P had said it was looking at a number of internal and external candidates to replace Hurd, with Reuters recently reporting it was rejected by a pair of IBM (NYSE:IBM) senior execs. Analysts had expected H-P to seriously look at a number of in-house candidates, including Todd Bradley, Ann Livermore and Dave Donatelli.

“H-P has a powerful mix of businesses, products and services, one of the most innovative cultures in the industry, and an accomplished management team who have played a critical role in its success," said Apotheker. "I am deeply honored to be joining the more than 300,000 dedicated H-P employees."

Lane, a former Oracle senior exec, had been serving as a managing partner at Kleiner Perkins Caufield & Byers.

“I am excited to join the board of this pioneering company, and look forward to working closely with Leo -- and the rest of the board and senior management team -- as they capitalize on the changes taking place across the industry," Lane said.

After being briefly halted, H-P's shares rose slightly in extended trading on Thursday, gaining 0.5% to $42.27. The stock tumbled in the wake of the Hurd ouster and is down nearly 18% year-to-date.