South Africa's top court ruled Tuesday that private, personal cannabis use was legal in a landmark case that had pitted law enforcement agencies against marijuana advocates and the judiciary.
Deputy Chief Justice Raymond Zondo, delivering the Johannesburg-based Constitutional Court's unanimous verdict, declared the law banning marijuana use in private by adults "is unconstitutional and therefore invalid".
"It will not be a criminal offence for an adult person to use or be in possession of cannabis in private for his or her personal consumption," he said, reading the ruling to cheers from the public gallery.
The court also ordered parliament to draft new laws within 24 months to reflect the order.
Outside pro-cannabis campaigners lit pipes and rolled joints to celebrate the news, filling the air with the distinctive aroma of marijuana.
"I'm happy I won't be getting any more criminal records for possession," Ruaan Wilson, 29, told AFP before pausing for a puff.
"Now we can get police to focus on real drugs and thugs," he added, wearing shorts and dark sunglasses.
A court in Western Cape had ruled in March 2017 that a ban on cannabis use by adults at home was unconstitutional, a move that effectively decriminalised it in the province, which includes Cape Town.
But the ministers of justice, police, health and trade challenged that finding, arguing that there was "objective proof of the harmful effects of cannabis."
Tuesday's ruling will not decriminalise the use of the drug in public nor the offences of supplying or dealing -- but cultivation for personal, private use will no longer be illegal for adults.
Previously, possessing, growing or using marijuana for personal use -- even in small quantities -- exposed users to fines of up to hundreds of dollars (euros) as well as jail time, although this latter punishment was rare. Penalties for selling the drug were far higher.
Three cannabis users who had faced prosecution for using the drug argued in the Constitutional Court that the prohibition "intrudes unjustifiably into their private spheres".
'WEED IS LIFE'
Activists clutching banners reading "Weed are free now" and Rastafari flags gathered outside the court in central Johannesburg.
Other boards read "Free the weed", and "Legalise weed, end economic depression #weedislife".
Some activists also called for cannabis to be decriminalised for use in public.
"It's not enough, we also have privacy in person, as we walk in a public space, therefore we should be allowed to carry cannabis in public," said Jeremy Acton, leader of the Dagga Party in South Africa which advocates for the rights of cannabis users.
Several of the roughly 100 activists sang struggle-era anti-apartheid songs.
Previous court hearings on the emotive issue have drawn protests by those opposed to legalising cannabis, as well as by those in favour of decriminalisation.
Use of cannabis and medicinal marijuana has gained popularity in some parts of the world to ease suffering from cancer, glaucoma, HIV and AIDS, and other serious conditions.
But opponents fear crime connected to drug abuse and users graduating to harder drugs. They also cite medical research which suggests a link between heavy use of marijuana and psychotic disorders such as schizophrenia.
The country's Medical Research Council has already launched trials to help guarantee quality, consistency and standards, according to local media.
"We have used cannabis to treat anxiety, colic in children and as an antiseptic in secret for many years," said Phephsile Maseko of the Traditional Healers Organisation. "Now we will be able to develop the plant even further."
South African opposition lawmaker Mario Oriani-Ambrosini submitted a draft law in 2014 calling for the legalisation of marijuana but he died soon after, and his initiative was shelved.
Globally, the legal status of cannabis varies widely. In Portugal, for example, possession and use is largely decriminalised, while users in Saudi Arabia face the death penalty.
The breakthrough for South African cannabis users came just a day after US soft drinks giant Coca-Cola confirmed it was studying the use of a key ingredient in marijuana to make "wellness beverages".