Kirk Materne, an analyst at Evercore Partners who covers Microsoft, agreed that the company had little choice. “It was a fairly low-risk way for Microsoft to dip its toe into the market and try to extend Windows’ relevance,” he said. “It’s not going to be pretty. They’re already running uphill. But investors have very low expectations. If Microsoft can regain any momentum, it’s all upside for them.”

With $83 billion in cash on its balance sheet, Microsoft’s investment in Nokia is relatively modest.

Still, for Microsoft or Lenovo or any other hardware maker trying to grab market share, the trends are ominous: In a global market once dominated by Nokia and BlackBerry, both are struggling for survival. Nokia’s market share in 2013 dropped 25 percent, to 13.8 percent, and BlackBerry’s was just 1.9 percent, according to the research firm IDC.

So far, the marriage of the Microsoft Windows operating system with Nokia’s handsets under the Lumia brand has done little to upend the global smartphone market. Although Lumia’s fourth-quarter sales doubled to 8.2 million from the year earlier, they still represented a drop from the previous quarter. And Lumia fell even further behind Samsung, which sold 10 times as many that quarter (86 million), and Apple (51 million). It was also behind both Huawei (16.6 million) and Lenovo (13.6 million).

In its last earnings report as a handset manufacturer, Nokia said last month that the handset division it was selling to Microsoft lost 201 million euros in the fourth quarter and sales fell 29 percent. Microsoft has said it needs to sell 50 million Lumia units a year to break even, and it is nowhere near that yet.

Google seems to have made only a halfhearted effort in its foray into handsets, but its numbers were also grim. Under Google, Motorola had operating losses of $1.1 billion in 2012 and $645 million for the first nine months of 2013.

But analysts I interviewed said Microsoft may not have the luxury that Google did of abandoning a money-losing handset operation. “Microsoft doesn’t have the same hand to play as Google,” said Ken Sena, the Evercore analyst who covers Google. Unlike Microsoft, Google does not have to worry about its ecosystem since Android is the largest handset operating system by far. Android ensures access for Google’s search engine, which is where Google earns the bulk of its profit. Selling Motorola to Lenovo will strengthen a growing competitor to Samsung, even as it gets Google out of a business that put it in the awkward position of competing with some of its largest customers.