The Vermont Senate voted on Thursday to approve a bill to legalize recreational marijuana in the state.

The final vote was 17-12, after a preliminary vote of 16-13 on Wednesday, the Burlington Free Press reported.

The law would allow state residents 21 and older to purchase up to half an ounce of marijuana and possess up to an ounce of marijuana at a time. State regulators could also begin to issue growing licenses in late 2017, and retail sales could begin in early 2018, local news station WPTZ reported.

The bill will now move to the state House of Representatives for approval.

“Most people believe the policy we have in place now is not working,” House Speaker Shap Smith, a Democrat, said Thursday. “I think the question that has to be answered is will the alternative that’s come over from the Senate address the areas where the policy isn’t working now? Whether we can fix it this year is an open question.”

Vermont Gov. Peter Shumlin, also a Democrat, has said he wants to legalize marijuana in the state with legislation rather than public referendum.

“To do it right, we must do it deliberately, cautiously, step by step, and not all in one leap as we legislate the lessons learned from the states that went before us,” he said in his State of the State address this year.

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Katie Reilly at Katie.Reilly@time.com.