SALT LAKE CITY — Utah has joined more than 30 other states in legalizing medical marijuana by passing a ballot measure that was opposed by influential Mormon leaders.

The plan that crossed the finish line on Friday creates a state-regulated growing and dispensing operation and allows people with certain medical conditions to use the drug in edible forms. It does not allow pot smoking.

The parameters of the law are set to be revised under terms of a compromise reached before the election by marijuana proponents, Mormon leaders, the governor and state lawmakers.

The compromise won’t allow certain types of edible marijuana that could appeal to children, like cookies and brownies.

Mormon leaders had opposed the ballot proposal over fears it could lead to more broad use, but agreed to the compromise because to allow access for people with serious medical needs.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.