The federal government will table a bill to legalize recreational marijuana on Thursday that is expected to tightly control the ability of producers to market their products to the public, federal sources said.

But key issues such as how to deal with drug-impaired driving have yet to be fully resolved.

The government has indicated its legislation will be highly restrictive and designed to discourage people from consuming marijuana, especially under the age of 18. The bill is expected to include tough penalties for those who provide marijuana to children and teens, sources said.

Story continues below advertisement

Explainer: Legalized marijuana is coming, but what does it mean to you?

High stakes: A Canadian investor's guide to marijuana

Andre Picard: Why stop with pot? Let's decriminalize all drugs

"The goal will not simply be to legalize marijuana, but also to prevent youth from having access to it," a senior official said.

The proposed legislation is also expected to call for plain packaging for recreational marijuana so that it would be marketed more like tobacco products than alcohol.

"It would be hard to imagine a scenario where you could sell pot like you could sell booze," a senior government official said.

Although the bill is scheduled to be tabled in the House of Commons on Thursday, the government refuses to commit publicly to the date on which adults will be able to consume the product legally for recreational purposes for the first time since it was first prohibited in 1923.

Story continues below advertisement

"The legislation will be introduced in the near future and we will ensure that it benefits from a robust parliamentary process before cannabis becomes legalized," Justice Minister Jody Wilson-Raybould told reporters.

The bill unveiled this week is not expected to include all provisions that will be needed before marijuana is officially legal.

For example, final plans to enforce tougher provisions against drug-impaired driving are not expected to be released until the government publishes the results of a recent pilot project with police forces on saliva-based roadside tests, sources said.

"On Thursday, there will be a legislative package, but in terms of the full suite of measures, not everything will be there," a federal official said.

The senior government official acknowledged there is a "big gap" between the government's position on packaging and a recent proposal from Canada's licensed medical-marijuana producers, who have been getting ready for the multibillion-dollar recreational market.

In a recent letter to the government, several licensed producers called on Ottawa to allow cannabis to be sold in containers with colourful lettering and logos as long as it is not targeted at children.

Story continues below advertisement

"Packaging debates are often driven by public health concerns but in order to develop well-rounded public policy, rules surrounding packaging and in-store promotion must take into account the current status of the large, illegal cannabis black market and the harms it causes youth and society more generally," said the letter dated March 21.

"Therefore, there must be allowances for branding as well as for in-store advertising of cannabis products to ensure that consumers who have already self-selected to enter a legal cannabis retailer will be well-informed about the products they are purchasing," the letter said.

After it is tabled in the House, the legislation will be studied in committee in coming weeks.

In terms of the timing for the opening of the legal marijuana market, a key issue will be the ability of the provinces to develop the necessary infrastructure to distribute and sell it.

The legislation will be inspired by a task force led by former Liberal cabinet minister Anne McLellan, which proposed a complete legalization model in a well-received report last year.

Prime Minister Justin Trudeau has already endorsed one of its key recommendations: that marijuana should be legal for people who are of legal drinking age – 18 or 19 years old, depending on the province they live in.

Story continues below advertisement

The task force also urged the government to allow Canadians to buy or carry 30 grams of marijuana for personal use, and to grow up to four plants at home. The task force also recommended a system that would feature storefront sales and mail-order distribution, and allow a wide range of producers to operate legally, including "craft" growers and the current producers of medical marijuana.