SALT LAKE CITY, UT. (AP) — Utah Gov. Gary Herbert has signed into law a compromise agreement that guarantees legalization of medical marijuana.

Herbert said late Monday the passage of the bill was a historic day in conservative Utah. He said in a statement a new regulatory system, that helped win the approval of the influential Church of Jesus Christ of Latter Day Saints, will dispense cannabis in “medical dosage form,” preventing diversion into the black market.

He says his administration will implement the law “as quickly as feasible.”

Lawmakers in Utah passed sweeping changes to the measure on Monday, prior to Governor Herbert’s signing of the bill.

Supporters of the compromise cheered the vote, saying it would help suffering patients while creating safeguards against broader recreational use.

With the bill now signed into law, some medical-marijuana advocates, still contend the system will throw up too many hurdles for suffering patients and have said they plan to file a lawsuit.