MedMen Enterprises Inc., one of the most prominent companies in the expanding cannabis industry, agreed to buy medical pot firm PharmaCann for $682 million, boosting its presence across the U.S.

The all-stock purchase, which will give MedMen 10 additional dispensaries and licenses for several more, is one of the biggest in the history of the legal weed industry, which has seen its value explode in recent weeks as Canada prepares to legalize cannabis for adult use next week. With regulations set to loosen in more U.S. states, and around the world, investors are pouring billions of dollars into marijuana companies.

MedMen, which is run from Los Angeles, currently has 16 marijuana dispensaries in the U.S., including in Los Angeles, Las Vegas and New York. With the acquisition of Illinois-based PharmaCann, MedMen will have 79 licensed cannabis facilities, including grow operations, in 12 states, the company said in a statement on Thursday.

MedMen went public earlier this year through a reverse takeover in Canada. The company made the move to have the capacity to do deals like the one announced Thursday, according to Chief Executive Officer Adam Bierman.

“The purpose of going public was to add more velocity to the trajectory we were on,” he said in an interview. “This leapfrogs us into our next phase of growth.”

MedMen’s shares have jumped 25 percent since the trading debut, giving the company a market value of $1.83 billion. So far, it has mainly been focused on the marijuana markets in California, New York, Nevada and Florida. MedMen is now moving into six additional states, including Massachusetts and Michigan.

The company opened a high-profile medical dispensary in April on Fifth Avenue in Manhattan, not far from the New York Public Library. MedMen paid $26 million for that license, betting that recreational legalization will eventually arrive in New York state.

“We built that store for the future,” Bierman said. “These markets have to be opened up and evolve into robust recreational markets over time.”