Canada on Wednesday becomes the second country in the world to legalize pot for recreational use nationwide, three weeks before Michigan voters will decide whether to legalize it in the state.

But don't plan a pot trip to Windsor just yet. At launch, recreational marijuana will be available for sale online only, with secure shipments to Canadian addresses.

"It has to be a Canadian address," Windsor Mayor Drew Dilkens said.

So unless you've got an Ontario friend who's willing to share it without selling it, you're out of luck for now. But that's temporary, Dilkens said.

"By April of next year, they will have, in Ontario, retail stores," he said.

Americans shouldn't plan on buying pot in Canada and bringing it back to the U.S.

"Customs and Border Protection officers are the nation’s first line of defense in preventing the illegal importation of narcotics, including marijuana," the agency said in a statement. "U.S. federal law prohibits the importation of marijuana and CBP officers will continue to enforce that law.”

The momentum to legalize marijuana has been building since at least 2001, when Canada became the first nation to allow it for medical purposes. The push for recreational pot started soon after. By 2015, a survey showed that about 12 percent of all Canadians, including 25 percent of people ages 15-24, admitted to using it in the previous year.

That year, Justin Trudeau made it a key point of his campaign, arguing that prohibition was clogging the court system with nonviolent offenders and enriching criminal enterprises. When Trudeau's Liberal Party swept to power that year, he promised to legalize it as soon as possible.

The formal legalization is the culmination of changes in both law and attitudes.

Growing support around the world

North Dakota will join Michigan in November in asking voters to legalize marijuana for recreational use. Utah and Missouri residents will vote on whether to approve it for medical use, which Oklahoma voters did in June.

Earlier this year, Vermont eliminated all penalties for possession of small amounts of pot and gave residents the right to grow their own marijuana in limited quantities.

"Canada will be the second to legalize nationally after Uruguay did it in 2013," said John Hudak, a senior fellow in governance studies at the Washington D.C.-based Brookings Institute, who wrote a book, "Marijuana: A Short History," examining the changing attitudes worldwide toward cannabis.

Hudak said more permissive attitudes are born of experience. Many people in both countries have used pot illegally and don't think prohibition is working.

Support for cannabis legalization varies by age, which is shifting the political ground on the issue, he said.

"There is some generational replacement going on," Hudak said. "The people who oppose cannabis the most are the oldest, and they are dying off. The youngest are the most supportive of cannabis and when you have that kind of dynamic, you can have social change pretty rapidly."

There are efforts to legalize cannabis in other countries as well, Hudak said.

Beginning Nov. 1, doctors in the U.K. can legally prescribe cannabis for the first time. The change came after a highly publicized case in which a 12-year-old boy with epilepsy had his cannabis-based medicines confiscated at Heathrow Airport. A YouGov poll in May showed 43 percent of Britons support legalizing recreational pot and 41 percent oppose with the rest undecided.

Mexico's new interior secretary, Olga Sánchez Cordero, is pushing for legalizing cannabis, to combat drug-related murders that have spiked in recent years. In 2015, Jamaica decriminalized possession of small amounts and legalized "ganja" for medical purposes.

Colombia, long-known for cocaine production, legalized cannabis for medical purposes in 2016 and the government is aggressively backing growers hoping to export the plant around the globe.

Canada is unique because of its size and economic clout. It also differs from Uruguay because it will allow noncitizens to buy cannabis when they visit, Hudak said.

"I think there is going to be cannabis tourism wherever it is legal," he said. "Surely there will be people crossing over to indulge."

What Canada's law will allow

Windsor has long been more libertine than Detroit, supplying booze on the sly during Prohibition. Today, it has a lower drinking age, 19, and like the rest of Canada, prostitution is legal there.

Even if Michigan votes next month to legalize marijuana, Canada will have a head start.

Canada's move to legalize marijuana for recreational use began in April 2017 when the Cannabis Act was introduced in Parliament. Trudeau backed the measure, noting he'd used cannabis himself, including while serving in Parliament. In June, the final version of the bill passed the Canadian Parliament, with about two-thirds support in both chambers.

The law leaves much of the regulation of cannabis to the provinces, including minimum age, distribution methods and other issues. To gauge how Ontario residents wanted those issues handled, the province surveyed residents. In all, more than 53,000 Ontario residents responded to the survey, including 16,000 who responded within the first 24 hours.

Younger Canadians were the most vocal. People 15-34 make up about 30 percent of Ontario's population, but were about 50 percent of the people who responded to the survey and included their age.

A California company that specializes in greenhouses for marijuana growing is expected to have a presence at a business park in Windsor Township, Michigan.(Photo: Associated Press)

Among the things Ontario residents wanted were a minimum age, no-pot zones around schools, libraries and community centers and a broad-based public awareness campaign explaining the risks of cannabis use.

The Canadian law allows individuals to possess up to 30 grams, about 1 ounce, in public and grow up to four plants per residence. The proposed Michigan law would be more permissive, allowing possession of up to 2.5 ounces and up to 12 plants per household.

Ontario's minimum age is 19, compared with 21 proposed in Michigan.

Marijuana for smoking and oils for vaping will be the only forms of cannabis available at launch, though edibles — cannabis-infused foods such brownies — will be available by next year.

For now, there's only one legal seller of pot, a government-sponsored online entity, the Ontario Cannabis Store, which was probably named by the marketing folks who brought you The Beer Store. That store will legally sell cannabis until retail stores open next year.

Ontario uses government-run stores to sell alcohol. Beer is sold at The Beer Store outlets and wine and liquor are sold at the Liquor Control Board of Ontario, or LCBO, locations. But the province plans to allow private stores to sell cannabis.

"We're going to let private people make application for a license," Dilkens said. "They are regulating the distance between stores, the distance from schools, etc."

The Ontario legislature is still working on bills to regulate the locations and operations of retail stores.

Using cannabis in a workplace will be illegal in Canada, but employers will still be allowed to set rules for how to deal with workers who still have it in their system.

Some, like Air Canada, have announced policies that would require pilots, flight crews and maintenance workers to abstain completely. Toronto Police recently announced that officers can't use cannabis within 28 days of reporting for duty.

Many employers are focusing on a "fit for duty" standard, which would mean that employees must not be impaired when the arrive for work.

Dilkens said police are preparing for the new law, though he admits some changes won't come until after the law takes effect.

"How do you detect intoxication by drug? There are certain units that police can buy that do that but our province hasn't adopted that fully," he said. "We will not be ready."

Mouth-swabs can measure the amount of THC, the active ingredient in marijuana. Blood samples, can, too. Under Canadian law, having 2-4 nanograms of THC per milliliter is considered impaired driving and carries a maximum fine of $1,000.

A driver with 5 or more nanograms of THC is guilty of what Canada calls a hybrid, and faces a minimum fine of $1,000. A second such offense carries a mandatory 30 days in jail and a third offense brings 120 days in jail. The same penalties apply if a both THC and alcohol or other drugs are found in a driver's blood.

Penalties increase if the impaired driver is in an accident that causes an injury or death.

Under Michigan's proposed legalization, any amount of THC in the blood is considered impaired.

Dilkens said he expects cases of drugged driving to increase, at least in the short term.

"I think over time, things will normalize," he said. "But I think, at first, as people become curious about it, they may take risks, not understanding the full impact it's had on them."

Under the new laws, cannabis will be taxed at the federal level and some of that revenue will flow down to cities like Windsor, though Dilkens said he expects the city's costs, for things like enforcement, arrests and other related work, to rise in the short term as police and residents adjust.

"I think personally, in a lot of ways, the criminality of marijuana has made criminals out of people who were not otherwise criminal," Dilkens said. "We've made criminals out of a people who are probably otherwise law-abiding citizens."

Health Canada, the nation's health ministry, has launched a public awareness campaign to educate the public about the dangers of cannabis use. The message is that young people should avoid it.

"We know that the brain is still undergoing significant maturation until the age of 25," said Dr. Amy Porath, director of research for the Canadian Center on Substance Use and Addiction. "To preserve brain health, it's important for young people to delay the use of cannabis as long as possible."

What's next: pot cafés?

So will Americans be able to head to Windsor, have a seat in a bar and smoke or vape marijuana at will?

Probably not, at least not right away.

Right now, Ontario law doesn't allow alcohol and cannabis to be sold in the same establishment. Ontario law also prohibits smoking in a workplace, though there appears to be some gray area there when it comes to marijuana.

Higher Limits, on Windsor's main drag of Oullette Aveune, bills itself as North America's largest cannabis lounge. It boasts 6,000 square feet of space, high-speed internet service and a head shop selling bongs, rolling papers and other cannabis paraphernalia.

It's designed to give medical marijuana users a place to smoke and socialize. It also sells pop, chips and candy. When a pizza place was operating downstairs, the facility allowed cannabis users to order a pie and eat it upstairs while they smoked.

One thing Higher Limits doesn't sell: cannabis.

Still, more than 100,000 people have paid the $5 admission fee to bring their own since the lounge opened three years ago, said co-owner Jon Liedtke. Canadian law doesn't allow police to ask people for proof that their cannabis is medically prescribed.

Liedtke said his business gets around the smoke-free workplace requirements through an exemption granted to medical research facilities. He said Higher Limits takes surveys of users and shares them with medical researchers, a move that allows people to smoke around his employees.

He thinks, eventually, recreational users will be welcome in his facility.

"We do expect that with legalization this final bit of stigma will be removed," Liedtke said. "We're going to see an increase in business."