Marijuana (cannabis, weed, marihuana) is not legal in Peru. The Peruvian Penal Code, however, does allow some leeway in terms of the possession of marijuana for personal use.
According to Article 299 (“Posesión No Punible,” or non-punishable possession), the possession of marijuana is not punishable if possessed for personal and immediate consumption in quantities not exceeding “eight grams of marijuana or two grams of derivatives.”
Article 299 goes on to state that the possession of two or more types of drugs is a punishable offence (regardless of quantity).
The reality of marijuana possession in Peru goes far beyond the nation’s penal code. If you are caught in possession of two grams of marijuana (well below the non-punishable maximum), don’t expect to walk away without any problems. The police in Peru see drug possession as a crime, regardless of the laws of possession. If they think you are a drug dealer, you could find yourself in a cell for a few days. If a corrupt police official stops you, those two grams could easily turn into a total nightmare.
As a rule, buying and possessing marijuana in Peru is a big risk -- and one you should avoid. Carrying eight grams or less may be legal according to Article 299, but the reality can be far more severe.