Canada on Wednesday became only the second country in the world to legalize marijuana nationally.

Although Uruguay started selling cannabis products last year under a 2013 law, Canada's foray is considered more significant because of its economic status and much larger population. In the U.S., meanwhile, the move will be closely watched for its impact in the years ahead on everything from migration and crime to tourism and economic growth.

Canada started planning to legalize cannabis shortly after Prime Minister Justin Trudeau took office in 2015, making good on a campaign pledge. Canadian officials have said they want to take a "public health approach" to limit youth access to pot, displace the illegal market, and ensure safety requirements for cannabis, according to a fact sheet on the initiative.

Get Breaking News Delivered to Your Inbox

Enforcing the rules won't be easy. Canada's 13 provinces and territories are setting their own rules for cannabis use, leading to some confusion. While Quebec and Alberta set the buying age for marijuana at 18, the legal age across the rest of the country is 19. The regulations governing when, where, and how one can buy and ingest marijuana in Canada also vary by province.

Don't try sneaking it across the border

Marijuana remains illegal in the U.S. at the federal level. That means Americans are barred from carrying cannabis across the Canadian border. U.S. immigration agents may even choose to ban Canadians from entering the country if they admit to smoking pot, even if they are entering states where it is legal, such as Washington.

"Although medical and recreational marijuana may be legal in some U.S. states and Canada, the sale, possession, production and distribution of marijuana or the facilitation of the aforementioned remain illegal under U.S. federal law," the U.S. Customs and Border Protection service declared in a statement last week. "Consequently, crossing the border or arriving at a U.S. port of entry in violation of this law may result in denied admission, seizure, fines, and apprehension."

Brandon Lee, consul general of Canada in Seattle, told the Seattle Times that people should be especially cautious when traveling by ferry or by road because they may forget they're carrying cannabis.

"B.C. and Washington — we're so close, even personality-wise, culturally," Lee told the paper. "If people are cannabis users here or in B.C. … they may have some in their car."

Rapidly budding market

In the U.S., marijuana is legal in 29 states and Washington, D.C. for medicinal or recreational use. Those areas represent an outsized share of demand, at roughly 90 percent of the global cannabis market last year, or upwards of $9.5 billion, according to research from Arcview and BDS Analytics.

But investors are banking on even faster growth. That is pushing up the value of cannabis stocks and driving industry consolidation as pot vendors, major beverage companies and other players compete to serve a growing customer base. U.S. companies either exploring or barreling into the cannabis trade include Coca-Cola and Constellation Brands, the maker of Corona beer.

Products also are "evolving" beyond the staid old joint, according to the Arcview and BDS report. In Colorado, for instance, dried flower use made up 47 percent of last year's fourth-quarter sales, with demand for edibles and concentrates growing especially fast.

Wall Street analysts now think the cannabis market, while still volatile, could expand beyond recreational and medical use into food, beverages, pharmaceuticals and other areas.

"Our broader, big picture view of cannabis goes beyond the adult use launch in Canada on October 17," Cowen analyst Vivien Azer wrote in a recent note. "We believe this is the first step toward the establishment of cannabis as a key functional ingredient touching multiple consumer categories."