Ottawa - Canadian airline passengers will soon be able to pack up to 30 grams of cannabis when they board a flight once recreational use of the mind-altering drug is legalized, the government said Thursday.

"After October 17, 2018, passengers will be permitted to have a legal amount of cannabis, which is 30 grams, in either their carry on or checked bag, if they are flying to a domestic destination (i.e. within Canada)," Delphine Denis, spokeswoman for Transport Minister Marc Garneau, told AFP.

However it is still illegal to take pot across international boundaries, such as on trans-border flights, Denis added.

This includes between two jurisdictions where cannabis is legal, for example, between Vancouver on Canada's Pacific coast and Seattle in the US state of Washington.

"Doing so can result in serious criminal penalties," Denis warned.