Canadian cannabis firm Canopy Growth Corp. has a deal to buy a U.S.-based maker of marijuana gummies – but only if pot becomes federally legal in the U.S.

The deal gives Canopy an option to buy all of Boulder, Colorado-based Wana Brands for $297.5 million in cash upfront and other provisions that will pay the company 15% of its market value at the time of the transaction, according to a statement. Canopy may make additional payments at the 2 1/2- and 5-year anniversaries of the transaction.

The deal will give Canopy a leg up should the U.S. relax its federal laws on marijuana, as well as a strong brand in the growing category of edibles, Canopy Chief Executive Officer David Klein said in a phone interview Thursday after the deal was announced.

“We’re moving toward achieving the vision we have to become a comprehensive North American cannabis player,” Klein said. “Based on our research, we expect that edibles in general, drinks, softgels and gummies will be the primary point of entry for new consumers into the THC category.”

Canadian companies are looking for ways to get in on the larger, high-growth U.S. market, but still face the sizable obstacle that marijuana remains federally illegal and can’t be imported. Canopy has similar deals with Acreage Holdings Inc. and TerrAscend Corp.

The right to acquire Wana secures another major, direct pathway into the U.S. market and gives the company a top-ranked cannabinoid gummies brand in Canada, the company said in the statement. For now, however, there is little the companies can sell together on either side of the border: Though Wana has expertise in CBD, the nonpsychoactive compound in marijuana that is federally allowed in the U.S., that business is intertwined with the THC-making division, meaning the companies can’t sell together in the U.S. And in Canada, Wana already has a licensing agreement with another company, Klein said.

“We have to figure out technically how to do that work,” he said, noting that Wana might be able to use Canopy’s revenue to help market CBD products.

Canopy’s U.S.-listed shares were up 1.6% to $13.50 in premarket trading at 8:19 a.m. in New York. The stock is down 47% this year.

Wana sells products in Canada and 12 states in the U.S., in part through licensing of its intellectual property. Its gummies come in flavors including watermelon, blueberry and mango, and include THC, the psychoactive compound in marijuana.

The deal includes Wana’s affiliated entities Mountain High Products and Cima Group.

Cassels Brock & Blackwell is acting as Canadian legal counsel and Paul Hastings is acting as U.S. legal counsel to Canopy on the deal. Bryan Cave Leighton Paisner is legal counsel to Wana.

Comments are not available on this story.