Yahoo global media head Ross Levinsohn, who until two weeks ago was tipped as the next chief executive, has resigned from the company.
He was appointed interim CEO in May after Yahoo CEO Scott Thompson resigned over inaccuracies discovered in his corporate biography.
Levinsohn was widely expected to win the role permanently after he helped end a patent battle with Facebook and Hulu head Jason Kilar dropped out of the running.
But in a surprise move, the Yahoo board appointed leading Google executive Marissa Mayer as CEO, ending months of speculation.
In an e-mail announcing his departure, Levinsohn said: "Leading this company has been one of the best experiences of my career, but it is time for me to look for the next challenge."
Levinsohn had let it be known both inside and outside Yahoo that he was likely to leave if he was not successful in running for chief executive, according to the Financial Times.
His departure is not therefore unexpected, but may come as an early blow to Mayer, who lacks Levinsohn's experience and connections in advertising sales, the paper said.
Read more Yahoo-related stories Yahoo lands Google's Marissa Mayer as CEO Yahoo CEO Scott Thompson quits Scott Thompson restructures Yahoo Yahoo's board removes Carol Bartz as chief executive Jerry Yang quits Yahoo
Levinsohn, a veteran of social networking service MySpace and search engine AltaVista, was known for interacting well with advertisers.
He won praise for recruiting former News Corp colleague Michael Barrett as Yahoo's head of revenue, and for brokering partnerships with Clear Channel, Spotify and Facebook.
"Ross has done a terrific job during his time at Yahoo," the company said in an e-mailed statement. "We wish him all the best."
Levinsohn will leave Yahoo immediately, but will go with the severance payments outlined in his 2010 offer letter and 2011 severance agreement, plus an equity award of 67,000 restricted stock units and 250,000 stock options.
According to Reuters, the stock and options have a current value of just over $5m, based on the closing price of Yahoo stock on Friday.