Marissa Mayer will be Yahoo's fourth CEO in four years.

NEW YORK (CNNMoney) -- Yahoo has a new CEO -- again! And this time the selection came completely out of left field.

Marissa Mayer, a Google executive and one of the first two dozen employees at the search giant, will take the reins of the struggling Yahoo.









Mayer held many jobs in her 14 years at Google and most recently served as vice president of location and local services. For years she was one of most public faces of Google (GOOG, Fortune 500), appearing in numerous media interviews and delivering keynotes on behalf of the company.

She had been considered one of the search company's most powerful executives when Eric Schmidt was CEO, but when founder Larry Page took the helm and reorganized the company back in April 2011, she didn't land one of the top jobs.

Many analysts viewed her most recent position as step down from her previous role as the Google's search product head.

Mayer resigned from Google via telephone on Monday, according to a report in The New York Times. In addition to her role as CEO, she will become a Yahoo board member. Mayer also sits on the board of Wal-Mart (WMT, Fortune 500).

Mayer's choice as Yahoo's CEO is an upset. Interim CEO Ross Levinsohn was widely considered to be the leading candidate for the job.

She takes over at a tumultuous time for a fading Web icon: She is the company's fourth CEO in less than four years.

"There's a lot to do," Mayer told Fortune's Patricia Sellers moments after Yahoo announced her appointment. She is starting her new job on Tuesday, just hours before Yahoo is slated to release its latest quarterly earnings report.

Yahoo had been in need of a leader since May, when Scott Thompson was ousted after just four months in the wake of a scandal over his embellished college degree.

Now, it's Mayer's turn to answer the age-old question: What, exactly, is Yahoo?

A company in transition

The company calls itself "the premier digital media company," and its news properties attract loads of traffic. But Yahoo's brand now has lots of baggage and a sprawling product portfolio.

Meanwhile, Yahoo has lost two of its former business strongholds. The company once led the search market, but it gave up on that sector three years ago. It's also losing ground with its other cash cow, display advertising, to newer entrants such as Google and Facebook.

Thompson took a stab at defining Yahoo during his few months at the company. In April, he reorganized the company into three groups: consumer, ad-focused "regions," and technology.

Thompson didn't get to see that vision through.

Yahoo's recent CEOs weren't able to pull off the turnaround, and their tenures were rocky. Before Thompson, Carol Bartz's phone firing followed a tumultuous relationship with the board. Her predecessor, Yahoo (YHOO, Fortune 500) co-founder Jerry Yang, stepped down after shareholders were angered by his snubbing of a buyout offer from Microsoft (MSFT, Fortune 500).

On the positive side, most of Yahoo's previous directors were wiped out in a board shakeup in February. Three nominees from Third Point -- the activist shareholder fund that exposed Thompson's resume lie -- have instead joined the board, and a new chairman is in place.