Microsoft basically just admitted that its deal to buy Nokia was a failure.

The technology giant confirmed Wednesday that it will be laying off "up to" 7,800 employees worldwide over the next several months, the majority of which are based in its phone division. That is in addition to the 18,000 employees that Microsoft announced it wouldlay off last year.

Microsoft will also write off losses of roughly $7.6 billion for its acquisition of Nokia's devices and services business, effectively admitting that the deal to buy Nokia was a failure. Microsoft ultimately spent $9.5 billion to buy Nokia's smartphone business, the most successful vendor of Windows phones, in a deal that some observers considered baffling.

The layoffs and writedown come just more than a year after Microsoft closed the costly acquisition of Nokia. The driving force behind the deal was previous Microsoft CEO Steve Ballmer, in a strategy widely viewed as a last-ditch effort to help the company find footing for Windows phones in a highly competitive smartphone market dominated by the likes of Apple, Google and Samsung.

"I am committed to our first-party devices including phones," Satya Nadella, Microsoft's current CEO, wrote in an email to employees about the moves. "However, we need to focus our phone efforts in the near term while driving reinvention. We are moving from a strategy to grow a standalone phone business to a strategy to grow and create a vibrant Windows ecosystem that includes our first-party device family."

Translation: Microsoft expects to continue delivering its flagship phones and devices to "Windows fans" — however many of those there may be. But it is a tacit acknowledgement that the company can no longer justify the cost of investing in thousands of employees to build hardware when it seems no closer to pushing beyond a distant third in the market.

"They were hoping to quickly be able to hit the jets and double or triple market share over what they had," Frank Gillett, an analyst with Forrester Research, says of Microsoft's decision to buy Nokia's device business. "And it didn’t happen."

"It's the last disappointment of the previous generation of Microsoft's leadership," he says.

Microsoft will continue to invest in a broader ecosystem of apps, which it is slowly acquiring by buying small tech companies. In recent months, Microsoft has acquired several popular applications including Sunrise and Acompli to reach users on other companies' smartphones rather than solely pushing its own Windows-branded devices.

Nadella's tenure as CEO has largely been devoted to trimming the fat at Microsoft in an effort to better position the company to compete in the smartphone market — and whatever comes next. Besides announcing the layoffs of those 18,000 employees last year, it has also shed mapping assets to Uber and sent off its display advertising business.

"I don’t take changes in plans like these lightly, given that they affect the lives of people who have made an impact at Microsoft," Nadella said in the email. "We are deeply committed to helping our team members through these transitions."

While the announcement may come as an unwelcome surprise to the affected employees, Wall Street appeared to be well prepared for the news. Microsoft stock was up by a slight 0.5% in early trading Wednesday following the news.

MSFT data by YCharts