Canada on Wednesday became the first G7 country to legalize marijuana sales nationwide.

Marijuana will be available to purchase either online or in retail stores depending on the province.

The global financial community is eagerly watching.

Marijuana sales officially began in Canada on Wednesday, making it the first G7 country — and the second country in the world after Uruguay — to legalize the drug for all adults.

Prime Minister Justin Trudeau campaigned on a promise to legalize marijuana, and his Liberal government delivered in the form of Bill C-45, otherwise known as the Cannabis Act.

While Trudeau cast the bill in a public-health lens, saying it would make marijuana more difficult for teenagers to access and erode black-market profits, the global financial community is eagerly looking at Canada to see how legalization plays out.

The bill legalizes marijuana but leaves it up to each province to set age limits and decide how to sell it. Some provinces, like Ontario — Canada's most populous province and financial center — won't have open storefronts on Wednesday.

Until Ontario's Conservative government works out the kinks in its plan to open the market to private retailers, Ontarians will be able to purchase cannabis online.

Other provinces, like Alberta, will have cannabis available in privately-run stores on Wednesday for all adults over the age of 18. Quebec, on the other hand, is planning to raise the age limit to 21. All provinces will have only marijuana flower available.

Vaporizers, edibles, and marijuana-infused beverages are expected to be made legal sometime next year.

The Canadian government also announced it is rolling out a plan to pardon those who have past marijuana posession charges.

Read more: Some of the hottest companies in the booming cannabis sector are going on hiring sprees — and it shows how competition among the biggest players is ramping up

A Canadian flag with a marijuana leaf was flown during a rally to demand the legalization of marijuana on Parliament Hill in Ottawa on April 20, 2012. Reuters/Patrick Doyle

'A bold and principled step'

Legalization advocates around the world cheered Canada's move.

"Canada's move to legalize marijuana is a historic rebuke to the disastrous global war on drugs, which has ruined millions of lives," Hannah Hetzer, a senior international policy manager at the pro-legalization Drug Policy Alliance, said. "Many countries are searching for innovative approaches to drug policy that emphasize health and rights, rather than repression. By taking this bold and principled step, Canada will likely become an inspiration for many other countries."

Financial markets and investors are looking to Canada as a bellwether to see how other countries will legalize the drug — and where lucrative opportunities may lie.

"We believe that the legalization in Canada offers a road map to invest in the companies that will form the basis of the legal cannabis industry in the coming years," Jon Trauben, a managing partner at the cannabis-focused Altitude Investment Management, said.

Canada's federally coherent regulations will give investors and businesses in the cannabis industry access to banking, public markets, and the ability to sponsor pharmaceutical research and publish papers — as in any other industry.

Canada's cannabis stocks have been frothy in the run-up to legalization.

In the US, it's a different ball game. The patchwork approach to legalization, in which weed remains illegal federally, means many cannabis businesses, which are legal in the states they operate, are denied access to the banking system, aren't able to get loans, and can't list on US stock exchanges like the Nasdaq or the New York Stock Exchange.

Researchers in the US also aren't easily able to study cannabis for medical purposes.

Read more: Here’s where you can legally consume marijuana in the US in 2018

Employees at Hexo Corp.'s facilities in Gatineau, Quebec, on September 26. REUTERS/Chris Wattie

Canada's biggest cannabis companies are scaling up and signing deals in preparation

For now, Canada's biggest cannabis producers are rapidly scaling up and signing deals to capitalize on the fervor around legalization.

Constellation, the third-largest beer company in the US, paid $4 billion in August for a 38% stake of Canopy Growth, the largest publicly traded marijuana grower, to develop marijuana-infused beverages and other products. It's the largest corporate investment in a marijuana cultivator to date.

Molson Coors recently entered a joint venture with Hexo, a publicly traded cultivator, to produce marijuana-infused beer for the Canadian market, among other deals.

Other big retail companies, like Walmart, have signaled they are exploring the market for CBD products. CBD, short for cannabidiol, is a nonpsychoactive component of marijuana that is linked to a range of health benefits but can't get you high.

While Canada's marijuana legalization is a massive opportunity for investors and cannabis companies, the true value, according to some, is in the pressure it puts on the US to change its marijuana laws.

"Canada has this big finger that is wagging, that is pointing down to us in the US saying, 'How come you can't get your stuff together?'" Adam Bierman, the CEO of MedMen, the largest US cannabis retailer, told Business Insider in an interview.

And while Canada may ultimately be a smaller marijuana market than California — the bank CIBC predicts it will become a $5 billion industry in the country by 2020 — the symbolism of being the first G7 country to legalize the plant means the whole world is watching.

"Canada has been so much more visionary, so much more progressive, and so much more reflective of the public sentiment in 2018 than the US has," Bierman said.

Read more of Business Insider's cannabis industry coverage: