Microsoft has made a big bet on LinkedIn, announcing Monday that it will spend nearly $26.2 billion in cash to purchase the enterprise-focused social networking and recruiting company.

The acquisition—which is the largest in Microsoft’s history and one of the biggest tech acquisitions ever—will combine the world’s largest enterprise-focused social network with one of the biggest enterprise software companies.

It’s more than just a social play, though. In addition to LinkedIn’s core professional networking product, Microsoft also gains access to products including presentation- sharing software SlideShare and professional training service Lynda.com.

One key purpose of the deal is to expand Microsoft’s portfolio of software that reaches users at work, in a variety of different scenarios.

In a video accompanying the acquisition announcement, Microsoft CEO Satya Nadella presented a vision for productivity tools that are connected to a professional network and can help users improve at their existing jobs and find a new ones as well.

Microsoft sees a future where everyone’s LinkedIn profile connects with all of their productivity apps, and automatically syncs information between Office apps. Furthermore, Microsoft plans to drive further personalization of its Cortana virtual assistant using LinkedIn information, so users can get details about upcoming meetings based on the profiles of the people they’re meeting with.

LinkedIn has 433 million registered users worldwide, with 105 million of those users visiting the social network every month. Those are attractive numbers for Microsoft, especially since those people are potential customers for many of the company’s products and services.

Jeff Weiner, LinkedIn’s CEO, will retain control of the company’s operations, and report directly to Microsoft CEO Satya Nadella. Microsoft says that LinkedIn will retain its brand, culture and independence after the acquisition, which is expected to close by the end of this year.

It’s unclear how far that independence will stretch—Microsoft didn’t say whether it plans to leave LinkedIn’s HR department independent of the company’s central processes in Redmond, for example.

The news comes at a tumultuous time for LinkedIn, which has been performing poorly on Wall Street since the start of 2016. The company’s fourth quarter earnings from 2015 disappointed investors, and its stock hasn’t been able to recover from that precipitous drop.

It also may be a tough pill for Microsoft shareholders to swallow, considering that the company just finished writing down almost all of the value from its acquisition of Nokia in 2013. Since then, Microsoft has massively curtailed its ambitions of being a phone manufacturer and taken $8 billion in write-downs.

Microsoft’s deal with LinkedIn is expected to close by the end of 2016. Microsoft will pay for the massive bill largely by taking on new debt. It has been approved by the boards of both companies, as well as by Reid Hoffman, the LinkedIn co-founder who remains the company’s majority shareholder.

To comment on this article and other PCWorld content, visit our Facebook page or our Twitter feed.