Residents of Maine voted to legalize marijuana in 2016.

But their governor on Friday vetoed a bill that would regulate and tax the sale of recreational marijuana, dealing a set back to the state's effort to implement retail markets.

Paul LePage said one reason he vetoed the bill is because the federal government prohibits cannabis.

"Until I clearly understand how the federal government intends to treat states that seek to legalize marijuana, I cannot in good conscience support any scheme in state law to implement expansion of legal marijuana in Maine," he said, in a letter to state lawmakers. "We need assurances that a change in policy or administration at the federal level will not nullify those investments."

The bill passed the Maine Senate with a veto-proof majority, but not the House. Lawmakers will meet on Monday and have an opportunity to override LePage's veto. Friday was the last day for LePage to veto bills to regulate the sale of marijuana.

Erik Altieri, spokesman for the pro-legalization organization NORML, said LePage's veto "is just the latest in a line of anti-democratic attacks coming from his office and his stonewalling will only ensure the prolonged existence of a criminal black market in Maine and deny the state coffers of needed tax revenue."

"Maine should be looking at ways to expeditiously implement a robust legalization program that represents what state voters approved at the ballot box," said Altieri.

Related: California to tax pot as much as 45%

LePage pointed to what he called "the failing of the medical marijuana program" and "the exploitation of loopholes" which he said has led to an increase in medical marijuana patients in the last year. He also said Maine lawmakers are dealing with "unrealistic deadlines" to establish regulations.

Maine is scheduled to start up legal retail sales of recreational marijuana on July 1, 2018, the same month that Massachusetts and Canada are scheduled to begin legal sales. Medical marijuana is already legal in Maine.

Eight states have legalized the sale of recreational marijuana. The five other states are Colorado, Oregon, Washington, Nevada and Alaska. In Washington, D.C., voters legalized the possession, cultivation and use of recreational marijuana, but not the sale.

Related: The beer company that owns Corona is getting into the pot business

LePage is the second governor to veto a legalization bill.

Vermont became the first and only state earlier this year to pass a recreational legalization bill through legislative means. Governor Phil Scott, a Republican, vetoed the bill and said he was not satisfied it adequately protected public safety. But he would consider a bill that toughened penalties for stoned driving and providing marijuana to children.

The movement toward legalization has been growing in recent years, and medical marijuana is now legal in 29 states.

New Frontier Data, a company that analyzes the marijuana industry, says the legal cannabis market was worth in $6.6 billion in 2016 and forecasts that the industry could grow to $21 billion by 2020.