Google Inc vice president Marissa Mayer unveils Google Instant in San Francisco
Marissa Mayer, vice president, search products and user experience for Google Inc, unveils "Google Instant" during a news conference in San Francisco, California September 8, 2010. Reuters

Yahoo (Nasdaq: YHOO), the No. 3 search engine, said it had elected Marissa Mayer, the first woman engineer at rival Google (Nasdaq: GOOG) as its third CEO in 10 months. Mayer had been Vice President of Local, Maps and Location Services at Google.

Mayer, 37, will replace interim CEO Ross Levinsohn, who succeeded Scott Thompson who quit in May, following the ouster of Carol Bartz, who was fired last September.

The hiring of Mayer, a Stanford University graduate with an undergraduate and a master's degree in computer sciences, could finally end the turmoil at Yahoo. Following Bartz's ouster, the company came under fire from investors, notably Third Point Capital, which advocated for a shake-up and better management of assets. Three directors from Third Point were elected to the board in May and last Thursday by Yahoo shareholders.

Mayer will be the Sunnyvale, Calif.. company's second woman CEO and among a handful of other Silicon Valley woman company heads. Margaret Whitman has been CEO of Hewlett-Packard (NYSE: HPQ) since September and Stephanie DiMarco has headed Advent Software (Nasdaq: ADVT) for more than 20 years. At International Business Machines Corp. (NYSE: IBM) in Armonk, N.Y., Virginia Rometty has been CEO since Jan. 1.

Mayer is also a director of Wal-mart Stores Inc. (NYSE: WMT), the No. 1 U.S. retailer, as well as the San Francisco Museum of Art, San Francisco Ballet and the New York City Ballet.

Her job will be to try to recapture market share for Yahoo, whose share slipped again in the second quarter, falling farther behind Google and Bing from Microsoft (Nasdaq: MSFT), the world's biggest software company. Mayer had worked on Google's gmail and maps and sat on the oversight committee of the Menlo Park, Calif.-based company, She will also have to manage the sale of Yahoo's investments in China and Japan.

Yahoo said Mayer will start work Tuesday.

She was also elected a director of Yahoo, which had only one other woman director, accountant Susan James.

Shares of Yahoo jumped 2 percent, or 33 cents, to $15.98, in after-hours trading. They've lost 3 percent so far this year.