In the biggest tech deal of the year so far, Salesforce announced that it plans to buy Slack Technologies — provider of the popular workplace-messaging system — in a cash and stock deal worth $27.7 billion.

According to Salesforce, the combination of Slack with its flagship customer-relationship management system will “create the operating system for the new way to work.” With the acquisition, Slack will become the new interface for Salesforce Customer 360 and Slack will be “deeply integrated” into every Salesforce Cloud, the company announced.

Once the deal closes, Slack will become an operating unit of Salesforce and will continue to be led by founder and CEO Stewart Butterfield. Salesforce expects the acquisition, which still requires regulatory approval, to close in the fiscal second quarter of 2022 (which ends July 30).

The core driver of the deal was to help Salesforce compete with Microsoft’s Azure/Office 365 cloud stack and Microsoft Teams enterprise collaboration solution, according to Wedbush Securities analyst Dan Ives. “Slack, despite facing stiff competition from Microsoft, has been a clearly successful solution set further penetrating enterprises and thus looks like the natural fit for Salesforce to beef up its collaboration and messaging footprint and keep pace with Nadella & Co.,” Ives wrote in a research note.

Salesforce customers in the media and entertainment space include NBCUniversal, Spotify, Pandora, Activision Blizzard, EA and Vox Media.

Salesforce chair and CEO Marc Benioff called the proposed takeover of Slack a “match made in heaven.”

“Stewart and his team have built one of the most beloved platforms in enterprise software history, with an incredible ecosystem around it,” Benioff said in a statement. “Together, Salesforce and Slack will shape the future of enterprise software and transform the way everyone works in the all-digital, work-from-anywhere world. I’m thrilled to welcome Slack to the Salesforce Ohana once the transaction closes.”

Butterfield added, “The opportunity we see together is massive. As software plays a more and more critical role in the performance of every organization, we share a vision of reduced complexity, increased power and flexibility, and ultimately a greater degree of alignment and organizational agility. Personally, I believe this is the most strategic combination in the history of software, and I can’t wait to get going.”

Butterfield founded Slack in 2009, and the company reportedly has rebuffed previous acquisition overtures from Google, Microsoft and Amazon. Slack went public in June 2019 with a direct listing, but its shares have traded below the initial offering price as the company didn’t catch fire with investors in the way collaboration companies like Zoom Communications have during the COVID pandemic.

Both Salesforce and Slack have alleged anti-competitive behavior by Microsoft. This July, Slack filed a complaint against Microsoft with the European Commission, alleging Microsoft illegally tied Teams product to its “market-dominant Office productivity suite, force installing it for millions, blocking its removal, and hiding the true cost to enterprise customers.” After Microsoft bought LinkedIn for $26.2 billion in 2016, Salesforce — which had bid for the networking site — unsuccessfully lobbied regulators to block that deal, saying it would give Microsoft an unfair advantage.

Salesforce said it expects to fund the cash portion of the Slack deal through a combination of new debt and cash on its balance sheet. The company said it secured $10 billion in bridge loans from Citigroup, Bank of America and JPMorgan Chase Bank.