Thailand's junta-appointed parliament voted to amend the Narcotic Act of 1979 on Tuesday.
It happened after an extra parliamentary session was arranged to push bills through before the New Year's holidays, according to Reuters news agency.
The amendment will become law when it is published in the government gazette, The Bangkok Post reported.
"This is a New Year's gift from the National Legislative Assembly to the government and the Thai people," said Somchai Sawangkarn, chairman of the drafting committee, during the televised session.