DES MOINES — Gov. Terry Branstad said Monday he likely will sign into law legislation to expand access to medical cannabis for more seriously ill Iowans, but first he wants to make sure the bill doesn’t have unintended consequences that would allow recreational use of marijuana-derived products.

“This was just worked out in the closing hours of the session, so we’re going to carefully review it, but I think this is certainly a subject that has a lot of interest and support,” Branstad said during his weekly news conference. “I’m pleased the Legislature was able to reach a consensus on this difficult and contentious issue. “

House and Senate members worked in the session’s waning hours to reach an agreement to avoid a 2014 law from expiring July 1 without something to replace it.

Authors of House File 524 said it would expand access to medical cannabis to more Iowans suffering from debilitating medical conditions, but did not go as far as the Senate earlier proposed.

Currently, Iowa’s law decriminalizes possession of cannabis oil for treatment of chronic epilepsy. The proposed legislation on Branstad’s desk would authorize up to two operations to grow marijuana and process 3 percent cannabidiol that would be distributed by five state-approved dispensaries. Iowa-based doctors could prescribe cannabis oil for treatment of up to 15 chronic conditions, if Branstad signs the bill.

“I have a responsibility to diligently review and consider all aspects and that’s what I do with every bill,” Branstad told reporters. “But certainly it’s something that I’m pleased was approved and I’m very hopeful that we don’t find any major problems, so I think it’s likely that I will sign it.”

During floor debates early Saturday in the Statehouse, architects of the plan noted it likely would take up to at least 18 months for the new program to get up and running, with a new state advisory board and a bidding process for state-licensed operations producing the cannabis oil for Iowa patients. In the meantime, qualified Iowans recommended by their physicians still would have to obtain cannabidiol from out-of-state sources.

HF 524 creates an advisory board of specialists and law enforcement to review medical evidence and studies to determine what conditions should be added to the list of debilitating conditions.

It also would recommend to the Board of Medicine additional diseases that should be covered. And, if it determines a condition requires cannabidiol oil with a THC level of more than 3 percent, it also would make a recommendations to the board.