“A year has gone by, and the competitive situation has not improved,” Mr. Ballmer wrote.

As a result, he said, “while a commercial partnership may have made sense at one time, Microsoft believes that the only alternative now is the combination of Microsoft and Yahoo that we are proposing.”

Mr. Ballmer met several times in late 2006 and 2007 with Terry S. Semel, then Yahoo’s chief executive, people involved in the talks said. While the talks  originally focused on the prospect of a merger or a joint venture  were initially constructive and appeared to move forward, they quickly broke down, these people said.

After a series of secret meetings between both sides in hotels around California and elsewhere, Mr. Semel and Yahoo’s board decided against progressing with the talks, betting that its stock would turn around as it introduced a new advertising system called Panama, these people said. Mr. Yang, in particular, was adamantly against selling the company to Microsoft and championed the view of remaining independent, they added.

Image Credit... Justin Lane/EPA

Mr. Ballmer constantly consulted with Bill Gates, the Microsoft chairman, about the progress of the negotiations, people close to the company said, and when the talks collapsed, he decided to wait to see the fate of Yahoo’s stock price. As the stock continued to fall, they said, Microsoft’s management became emboldened and began internal meeting in late 2007 about the prospect of making a hostile bid.

Despite their heavy investments in online services, both Yahoo and Microsoft have watched Google extend its dominance over Internet search and the lucrative online advertising business that goes along with it.

“No one can compete with Google on their own any more,” said Jon Miller, the former chairman and chief executive of AOL. “There has to be consolidation among the major players. It has been a long time coming, and now it is here.”