RICHMOND, Va. (AP)- Both chambers of the Virginia General Assembly passed legislation Friday that would legalize marijuana for adult recreational use, with retail sales starting several years down the road.

Work on the complicated legislation has been a priority for Democrats who control state government. But the process is far from finished — there are substantial differences between the two chambers’ bills that must be worked out before they can be sent to Gov. Ralph Northam, who could also seek to make additional changes.

“I think that Virginia is on a path to an equitable legalization plan for marijuana. There have been a few bumps, but I’m hopeful that we’ll have a polished bill we can agree upon in the next few weeks,” said Sen. Adam Ebbin, one of the chief patrons of that chamber’s bill.

The Eastern Shore’s Delegate Rob Bloxom voted against the House’s bill, while Senator Lynwood Lewis voted in favor of the Senate version.

.