Peru has become the latest country to legalise marijuana for medicinal use.
The majority of Peru's congress approved the legalisation supported by President Pedro Pablo Kuczynski by 68 votes to five.
Cannabis is normally prescribed for conditions like muscle spasms, chronic pain, PTSD, epilepsy and cancer.
Originally the law was controversial due to Peru’s problem with drug gangs involved in its cocaine production. The country is the second-largest cocaine producer in the world.
Proponents emphasised that the measure is aimed at extracting components from marijuana to address specific ailments.
The proposal was sparked due to a police raid of in February that a group of parents who producing cannabis oil for children with cancer and severe cases of epilepsy.
Pro-government politician Alberto de Belaunde said before the vote: "Science is on our side, the regional current is on our side. Let's not let our fears paralyse us."
Peru joins other South and Central American countries Uruguay, Mexico, Colombia, Chile and Argentina who have legalised the drug for medicinal and scientific purposes.
The bill, which will allow the regulated production of cannabis oil, will be written into law within the next two months.