Gov. Brian Kemp is set to sign a bill this week that allows medical marijuana patients to buy the cannabis oil they’re already legally allowed to use.

Kemp's office said he plans to sign House Bill 324 on Wednesday at the state Capitol, which would for the first time legalize the cultivation and distribution of medical marijuana through small growers, state universities and licensed sellers.

The measure was in jeopardy until Kemp helped broker a deal between House and Senate leaders who had struggled to strike a balance between providing access to legitimate patients while preventing illegal marijuana distribution.

In an interview earlier this month, Kemp expressed his support for the measure but said he was torn over whether it was the best way to expand the program.

“It’s a very, very tough issue. But there’s a lot of legislative support for it. I respect the legislative process, and I understand why people are doing it, and I understand why people have grave concerns about this,” he said. “I have all of those feelings. It’s a really tough spot.”

Georgia has allowed patients suffering from severe seizures and other illnesses to use cannabis oil since 2015. But because the state doesn't allow in-state cultivation, the roughly 8,400 people on the program's registry risk defying federal law by transporting the drug across state lines.

Advocates hailed the medical marijuana expansion, but the measure includes significant hurdles before cannabis oil is manufactured and distributed in the state.

Six private companies can grow medical marijuana, but no dispensaries will be allowed until a state board licenses them.

Pharmacies can provide medical marijuana oil to patients, but few pharmacies are likely to participate because doing so could jeopardize their federal permission to sell other drugs. And two proposed university-run marijuana programs will be dependent on federal approval.