AUGUSTA, Maine — Maine lawmakers overrode Gov. Paul LePage’s veto of an adult-use marijuana regulatory bill Wednesday, putting the state on track to regulate a retail market that has been in limbo since voters legalized recreational marijuana use in 2016.

The proposal that survived the Republican governor’s pen was Maine’s second attempt to create a framework for the system after a veto of an earlier bill was upheld in 2017, sending a special committee that was convened to handle the issue back to rehash it.

This year’s bill, sponsored by Rep. Teresa Pierce, D-Falmouth, will set an effective tax rate of 20 percent on marijuana products, give Mainers priority for commercial licenses, and set health and safety standards for the market. It won’t open before LePage leaves office in early 2019.

It passed the Legislature easily last month, but LePage vetoed it as expected. In a letter, the governor cited marijuana’s federally illegal status and his perception that the latest bill didn’t integrate recreational and medical marijuana programs.

The Maine House of Representatives voted 109-39 to override LePage’s veto, and the Maine Senate overrode it in a 28-6 vote. Few see the new law as perfect, but it is seen by most lawmakers as the only politically feasible way to regulate the recreational market approved by voters in a 2016 referendum.

 Lawmakers reduced the number of plants that adults will be able to grow at home from six in current law to three, and the bill will force cities and towns to opt in before sales are allowed there. It also scrapped the “marijuana social clubs” allowed in the voter-approved law.

Sen. Roger Katz, R-Augusta, who co-chaired the marijuana committee, said after the vote that Maine is “well-positioned to intelligently regulate marijuana,” though he noted that it will likely have to be adjusted over time.

“I think we’re just going to have to live with the law, and experience will dictate what changes that’ll be made in the future,” he said.

Opposition in the Legislature was split between the anti-marijuana right, which doesn’t want to allow recreational sales, and the pro-marijuana left, which thinks the new law is too restrictive. It was opposed by Legalize Maine, a group of medical growers that wrote the referendum.