Yahoo Inc's appointment of Google Inc veteran Marissa Mayer as its new chief executive surprised analysts, but they hailed the decision saying the Stanford engineer can create a more stable and focused organization.

Mayer, 37, edged out front-runner and acting CEO Ross Levinsohn to become Yahoo's third CEO in a year.

"We believe Mayer's background in product and technology and deep understanding of the Internet could lead to improved results at Yahoo longer-term," ThinkEquity analyst Ronald Josey wrote in a note to clients.

Mayer getting the top job in Yahoo was a surprise as it was seen as a race between Levinsohn and Hulu CEO Jason Kilar.

Levinsohn was focusing on turning the company into an entertainment and information destination that wins back the advertising dollars flowing elsewhere.

But the board may not have endorsed his media-focused, long-term plan to turn the ship around.

Mayer's appointment is a clear message from the board that her background in product is more likely to generate long-term revenue growth than a content focus, Needham & Co analyst Laura Martin said.

Yahoo's last two CEOs -- Scott Thompson from PayPal and Carol Bartz from Autodesk Inc -- also had more technology expertise in their resume than content and advertising.

Citi Research analyst Mark Mahaney said he has high regards for Mayer's organizational skills but Yahoo's challenges are substantial.

"Arguably, Yahoo has been mismanaged for more than five years with plenty of blame to go around."

Shares of Yahoo were up 1.6 percent at $15.90 in trading before the bell. The stock closed at $15.64 on Monday.