First social media, now marijuana -- Microsoft Corp. is so hip these days.

Three days after investing in LinkedIn Corp. US:LNKD in a record-setting $26 billion deal, the company announced its first venture into the world of marijuana, striking a partnership with KIND Financial to provide seed-to-sale software to state and local governments for the management of cannabis commerce and distribution.

The deal makes Microsoft MSFT, -1.24% one of the first major technology companies—and one of the first major publicly traded companies -- to acknowledge the rapid legalization of marijuana, with recreational use already legalized in Alaska, Colorado, Oregon, Washington and Washington D.C., and up for vote soon in five other major states, including California.

Major brands have been mute on the controversial topic, but more have started to show their support as acceptance has spread. Last month, Walgreens Boots Alliance WBA, -0.75% posted a blog touting research showing the benefits of medical marijuana, which is now legal in 24 states.

The legal marijuana industry is expected to balloon in coming years. Sales of legalized marijuana are projected to hit $6.7 billion this year, compared with $5.4 billion a year ago, according to industry tracker ArcView Market Research.

Also See: Marijuana sales on 4/20 hit record highs

KIND Financial is using Microsoft’s cloud platform to build out its services for government agencies. According to Marijuana.com., a team at Microsoft will help clients navigate regulations and laws, while tracking legal cannabis commerce and helping to stop product from reaching the black market.

In a statement, a Microsoft spokesperson said the company “supports government missions to regulate and monitor controlled substances and items, from the Justice Department regulating tobacco and firearms to a state regulating legal cannabis.”

Also See: Data show an increase in employees testing positive for cocaine and marijuana

Marijuana is still illegal at the federal level, complicating the development of the sector as federally-insured banks are reluctant to do business with companies that grow or distribute it. And many states do not have policies in place to allow for medical marijuana use. Last month, Nasdaq rejected MassRoots’ listing, saying the marijuana technology company, which acts as an industry-specific social network, might be seen as “aiding and abetting the distribution of an illegal substance.”

Shares of Microsoft traded 1% higher to $50.17 Thursday afternoon. They are down 7.8% over the last three months, versus a 1.7% improvement for the Dow Jones Industrial Average.

Kathleen Burke contributed to this article.

This article was first published on June 16, 2016.