Canadian MPs have passed a bill to legalise cannabis for recreational use by 205 votes to 82.

The legislation must now pass the Canadian Senate and receive royal assent by the governor general before becoming law, possibly by September.

If the bill does become law, Canada will be the first G7 country to legalise cannabis, a move Prime Minister Justin Trudeau promised during his 2015 election campaign.

Mr Trudeau has admitted having smoked a joint with friends "five or six times".

He has insisted his government would move to legalise the production, sale and consumption of the drug this year.

Last week, the government rejected 13 out of 46 amendments to the bill proposed by the Senate after several months of study, with Mr Trudeau's health minister rising to defend home cultivation of cannabis.

"Canadians are allowed to make beer at home, or wine," health minister Ginette Petitpas Taylor said on Friday.

"It is already possible for Canadians to grow cannabis for medical purposes and we absolutely believe the legislation should be consistent when it comes to recreational cannabis."

The government, she said, would follow its expert panel's recommendation to allow at-home cultivation of up to four pot plants for personal use.

As for the proposed advertising restrictions, she said the bill already contains limits such as a requirement for plain packaging.