Yahoo! Inc.’s Ross Levinsohn, who was interim chief executive officer, is leaving after the board passed him over for the top job and unexpectedly recruited Marissa Mayer, a former Google Inc. executive.

Levinsohn stepped into the position in May after former CEO Scott Thompson left amid questions about the accuracy of his resume. Levinsohn was a top contender before Mayer was hired to turn around the biggest U.S. Web portal, which has failed to keep pace with competitors Google and Facebook Inc. in user and advertising growth.

“Ross has done a terrific job during his time at Yahoo (Nasdaq: YHOO),” the Sunnyvale, California-based company said in an e-mailed statement Monday. “We wish him all the best.”

Levinsohn, a veteran of social-networking service MySpace and search engine AltaVista, was known for interacting well with advertisers.

On his watch, Yahoo recruited executives including Michael Barrett as chief revenue officer, and resolved a patent dispute with Facebook Inc. Mayer is an engineer who oversaw some of Google’s most popular products.

Yahoo’s sales tumbled 21 percent to $4.98 billion last year as users devoted less time to the service. Visitors on average spent less than two hours and 20 minutes on Yahoo pages in May, compared with more than six hours for Facebook, according to ComScore Inc.

Levinsohn’s exit is effective as of today, according to Yahoo’s regulatory filing.

Former Yahoos

Mayer is the fifth CEO to join Yahoo in three years. Thompson, who joined from EBay Inc.’s PayPal in January, replaced interim CEO Tim Morse. Morse stepped in after Carol Bartz was fired in September.

With Mayer, Yahoo selected a known technologist who joined Google as its 20th employee and first female engineer. She is credited with maintaining the company’s Spartan home page for a decade and overseeing such products as Gmail, Google News, and image, book and product search. In 2010, she became vice president of local, maps and location services.

Yahoo fell less than 1 percent to $15.98 yesterday at the close in New York. The shares have lost less than 1 percent this year.

Levinsohn, as part of his compensation for being interim CEO, will receive 67,000 restricted stock units, valued at $1.07 million, based on yesterday’s closing price. The company also awarded 250,000 stock options at a strike price of $15.80.

Done Deals

On Levinsohn’s watch as interim CEO, Yahoo worked out the final details of a plan for Chinese e-commerce provider Alibaba Group Holding Ltd. to buy back a stake in itself. The deal, long urged by shareholders, will hand Yahoo at least $6.3 billion in cash and as much as $800 million in newly issued Alibaba preferred stock.

Levinsohn’s background spans investing in startups, running online businesses such as FoxSports.com and helping clinch deals — notably, News Corp.’s MySpace acquisition.

Still, Levinsohn’s record as an investor is mixed. After leaving News Corp. in 2006, he teamed with former AOL Inc. CEO Jon Miller to begin a venture capital career focused on digital- media startups.

They were unable to raise a round of outside money, two people with knowledge of the matter said earlier this year. Instead, the duo merged with a Palo Alto, California-based firm that had already raised $1.5 billion. Over the next three years, Levinsohn led investments in eight digital media companies. One was shuttered, and five were sold at a loss to the firm of about $15 million.