Argentina's Senate voted unanimously to legalize medical marijuana, joining the lower house and setting the country on course to become the latest to relax its laws on pot.
President Mauricio Macri is all but certain to sign the bill, which garnered an unusual level of cross-party support and was applauded by patients and their families.
A group of mothers with sick children burst into tearful applause in the Senate as lawmakers voted 58-0 to pass the bill.
"This is a dream fulfilled, an immense happiness because it will bring solace to patients," said Maria Laura Alasi, whose four-year-old daughter Josefina suffers from West syndrome, a form of epilepsy that causes her to have dozens of seizures a day.
The new law lifts a ban on importing cannabis oil and allows Argentines to buy it with a prescription.
It stops short of allowing home-grown marijuana, something young patients' families had demanded.
"I have faith the senators will find a way around that," said Alasi. "A lot of mothers are already growing their own."
Latin America has seen a major political shift on pot in recent years.
In 2013, Argentina's neighbor Uruguay became the first country in the world to fully legalize marijuana at every stage of production, sale and consumption -- though users must be registered.
Colombia, Chile and Mexico have all legalized the cultivation and use of marijuana for medical and scientific purposes.