The bill, approved by 316 votes, is now pending Senate approval, after which Mexico will allow cultivation, transformation, sale, research and export or import of marijuana.
Mexico's lower house of Congress has approved a bill that would decriminalise cannabis for recreational, medical and scientific uses, bringing it a step closer to creating one of the world's largest markets for the plant.
Backed by the administration of President Andres Manuel Lopez Obrador, the bill marks a major shift in a country bedeviled for years by violence between feuding drug cartels.
Lawmakers on Wednesday have approved the bill in general with 316 votes in favor and 127 against.
Now, the Senate needs to review and approve the bill.
If passed, the law would create a huge market, which foreign companies are eager to tap.
The bill would allow five types of licenses for the cultivation, transformation, sale, research and export or import of marijuana.
Only people 18 years and older, and with a permit, would be able to grow, carry or consume marijuana and its derivatives.
READ MORE: Pakistan plans hemp production with eye on global cannabis market
'A false belief'
"Today we are making history," said Simey Olvera, a lawmaker from Lopez Obrador's ruling Morena party who was wearing a mask with marijuana leaves printed on it.
"With this, the false belief that cannabis forms part of Mexico's serious health problems is left behind."
Lopez Obrador, whose ruling Morena party has a majority in both chambers of Congress, has argued that decriminalising cannabis and other narcotics could help combat Mexico's powerful drug cartels.
In late 2013, Uruguay became the first country in the world to legalize the production and sale of marijuana in modern times.
Other countries in the region, such as Argentina, Chile, Colombia and Peru, allow its medical use.
In 2018, Canada also legalised marijuana, including recreational use, with several large US states also regulating its legal use.
READ MORE: Mexico blazes new trail as senate approves cannabis legalisation