SEOUL, South Korea — Recreational cannabis use may now be legal in Canada, but South Koreans visiting the country who are tempted to smoke up risk facing punishment back home, their government warned on Tuesday.

“Even if South Koreans are in a region where marijuana is legal, it will be illegal for them to consume it,” the South Korean Embassy in Canada said on Twitter. “Please take care not to commit an illegal act and be punished.”

South Koreans have known for decades that they can be prosecuted at home for using drugs overseas, even in countries where consumption is legal.

Under the country’s narcotics law, growing, possessing, transporting or consuming marijuana is a crime punishable by up to five years in prison or a fine of up to 50 million won, about $44,000.