SALT LAKE CITY (AP) — Lawmakers in conservative Utah passed sweeping changes Monday to a new voter-approved medical-marijuana ballot measure under a planned compromise that secured the support of the influential Mormon church but sparked a backlash from advocates.

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

“I believe this agreement was a landmark day for our state, and we are helping people,” said outgoing Republican House speaker Greg Hughes, who sponsored the legislation and helped bring together the players for talks.

The plan for changes was announced before Election Day as part of a broad compromise that won the backing of The Church of Jesus Christ of Latter-day Saints.

The changes ban many marijuana edibles, prevent people from growing their own marijuana if they live far from a dispensary and narrow the list of eligible medical conditions for which the drug can be obtained.

Smoking marijuana wasn’t allowed in the original ballot measure and won’t be under the new version.

Democrats argued the measure’s passage with 53 percent of the vote shows people want it as written, and they proposed leaving the original language intact. Republicans overwhelmingly voted down the idea.

The original legalization measure passed Nov. 6, putting Utah on a list of more than 30 states that allow medical marijuana.

Opponents say the changes create major obstacles to patients who want to get the drug and cut the number of locations where it would be available.

“It’s an almost complete disregard for the will of the people,” attorney Rocky Anderson said.

They plan to sue to block the compromise from going into effect, said Christine Stenquist with the group Together for Responsible Use and Cannabis Education.

She and other medical marijuana advocates went to the voters after years of trying unsuccessfully to convince conservative legislators to pass a bill, and the groups cleared a high bar to win a spot on the ballot.

Compromise supporters, though, argue it’s an improvement on the original and won over mostly Mormon lawmakers who have historically been reluctant to support any form of medical marijuana.

“For me to approve even this compromise is a huge step,” said Republican Sen. Allen Christensen.

Some medical marijuana advocates also support the agreement.

The Marijuana Policy Project praised the Monday vote, saying the revised measure is “undoubtedly inferior” to the ballot measure, but the vote on Election Day may have failed without the compromise.

“It’s now time to move forward,” Deputy Director Matthew Schweich said in a statement.

State law allows the Legislature to change the language of laws passed by voters.

“We have the right to override what the people do by initiative,” said Republican Rep. Merrill Nelson, though, he noted, “we don’t do that willy-nilly.”

Opponents of the plan criticized the compromise negotiations held largely out of the public eye, and said they are an example of the Utah-based faith exerting its influence on public policy.

Mormons have long frowned on marijuana use because of a key church health code called the “Word of Wisdom,” which prohibits the use of alcohol, tobacco and illegal drugs.

The church agreed to the pre-election deal to allow access for people with serious medical needs as the measure seemed to gain support.

Church leaders have said they stand behind the work done to help craft a compromise it considers a safer medical marijuana program.