Canada is set to legalize recreational marijuana a year from now, the first major economy to do so. But for medical marijuana patients, the available supply hasn’t kept pace with the demand. Are millions of people going to go online and start buying legally or will there be a slow transition over the next five years from the black market to the legal regulated market?

“Demand is quite high for marijuana already in Canada,” said Charles Sousa, Minister of Finance for Ontario. “So we want to make certain that, when we do proceed, there is sufficient supply to accommodate the activity because what we’re trying to do is curb the illicit use and organized crime that now exists around it.”

Trudeau’s framework for legalization will rely on Canada’s provinces to set up sale and distribution regimes. Federal Finance Minister Bill Morneau has said he favors a tax rate that will starve out the black market, and any shortage of legal weed would hinder that effort. Trudeau’s plans also allow people to grow up to four plants in a home.

Companies are still in the midst of trying to build and expand their facilities and everything would have to go “perfectly” in order to have enough supply. Initial sales will probably be online and by mail as it wouldn’t be possible for the market to stock enough inventory in government dispensaries across the country. And it’s still unclear what type of products will be available on the recreational and medical markets next year and the level of taxation.

Expanding patient lists are creating a shortage in Canada’s medical marijuana market as some producers stop taking new clients or sell out of certain strains. Canada had 167,754 registered medicinal marijuana users as of March 31, triple the amount from a year earlier. Supply shortages are already a problem for Canada’s existing legalized medicinal market.

Health Canada pledged last month to speed up its approval process for applicants seeking a license to grow marijuana. The agency has been more responsive but it still takes up to a year for a new producer to ramp up production and get product to market.

While the government has issued a number of new licenses, it may still take 12 months or more for new companies to start ramping up production. “I don’t know what anyone can do about it — you can’t force the plants to grow faster,” said Cam Mingay, a senior partner at Cassels Brock, when asked about a shortage.

Manitoba Finance Minister Cameron Friesen expressed concern about the timeline, saying it is too rushed to implement a legal market for recreational marijuana by July 2018. Sousa said his government has no problem with the implementation date.

“What we want is to basically be sure that all of Canada is able to implement and distribute at the same time,” he said. “I think some provinces are still trying to come to grips with how to get it done.”