"I am honored and delighted to lead Yahoo, one of the internet's premier destinations for more than 700 million users," Mayer said in a statement. "I look forward to working with the company's dedicated employees to bring innovative products, content, and personalized experiences to users and advertisers all around the world."
The appointment of Mayer, who joined Google in 1999 as employee No. 20, is a big coup for Yahoo, which has long been struggling amid brutal competition from Google and Facebook. News of the hiring was first reported by The New York Times.
Mayer, 37, has been Google's most prominent female executive, often speaking at big tech conferences about Google's products. She is known as the person responsible for the look and feel of Google's most popular products -- not just its main search homepage but Gmail, Google News, and Google Images. More recently, she was put in charge of Google's maps and location services. All told, the Stanford computer science grad was behind the launch of more than 100 Google products and features, according to Yahoo.
Google CEO Larry Page congratulated Mayer in a statement: "Since arriving at Google just over 13 years ago as employee No. 20, Marissa has been a tireless champion of our users. She contributed to the development of our Search, Geo, and Local products as well as many other product areas. We will miss her talents at Google."
Mayer was approached for the job in mid-June, as reported by Fortune's Patricia Sellers, and was told by Yahoo's board last Thursday that she was their choice. Mayer's -- she is due with her first child in October -- was not an issue. "My maternity leave will be a few weeks long and I'll work throughout it," Mayer told Sellers.
Venture capitalists Marc Andreessen, speaking at Fortune's Brainstorm conference, said the choice of Mayer shows that Yahoo wants to be more of a product-centic company rather than a media-focused company. He called the hiring a "big statement on Yahoo's part," and said it was "great for the Valley."
In taking the top job at Yahoo, Mayer certainly has her work cut out for her. During the first quarter of 2012, Yahoo posted revenue of $1.077 billion, representing just a 1 percent increase over the year-earlier period. That relatively flat revenue figure resulted from a 4 percent decrease in display advertising revenue and an 8 percent increase in search revenue.
The appointment of Mayer comes as Yahoo has gone through several CEOs in recent years. It was just last September thatas CEO after less than three years of trying to turn around the company. Unlike Mayer, Bartz had experience as a CEO, although of a very different type of tech company. She had spent 14 years as the CEO of Autodesk, the maker of design software. Before Autodesk, she worked at Sun Microsystems, 3M, and Digital Equipment Corp.
Mayer, of course, comes with a ton of experience in search and consumer Web products -- Yahoo's key areas. Even so, Yahoo is obviously a very different company than Google, and Mayer, who began her career as a programmer, has never been a CEO.
Speaking at Yahoo's shareholder meeting last week, Levinsohn said that Yahoo's focus is on attracting more page views with compelling content and tracking user data in order to target its ads more precisely.
"We firmly believe that if we want to be in the media and technology industries, we have to be in both aggressively," Levinsohn told investors. "Providing compelling content and relevant advertising for consumers is a real opportunity, and a white space that I think Yahoo can own."
Yahoo has recently lured other big Googlers. Last month,as executive vice president and chief revenue officer. Barrett will lead Yahoo's ad revenue and operations worldwide. Barrett was the chief executive of online-advertising firm Admeld before joining Google last year after the search giant acquired his company for $400 million.
Matching Mayer's appointment with the requirements of the new job, Citigroup's Mark Mahaney suggested a mixed picture. While praising Mayer's organizational skills, her familiarity with the consumer Internet industry and her managerial experience running a large team of engineers, he noted "that Yahoo's challenges are substantial."
"Arguably, Yahoo has been mismanaged for 5 plus years, with plenty of blame to go around," Mahaney wrote in a research note. "The clearest evidence of mismanagement is the lack of any Free Cash Flow growth for multiple years, despite the clear secular growth drivers of Internet advertising. What we are a bit worried about is that by selecting Ms. Mayer, Yahoo is explicitly pursuing an aggressive and bold growth strategy, whereas we believe a value strategy might be more appropriate."
Yahoo made the announcement after the close of regular trading on Wall Street, but its stock was up more than 2 percent in after-hours trading. Yahoo reports its quarterly earnings tomorrow.
Last updated: 10:15 PM PT