South Africa's highest court has legalised the use of cannabis by adults in private places.
Pro-marijuana activists cheered in the public gallery and chanted "Weed are free now" when the Constitutional Court gave its landmark ruling.
In a unanimous ruling, judges also legalised the growing of marijuana for private consumption.
South Africa's government had opposed its legalisation, arguing the drug was "harmful" to people's health.
It has not yet commented on the ruling, which is binding.
Three cannabis users who had faced prosecution for using the drug brought the case, saying the ban "intrudes unjustifiably into their private spheres".
In his judgement, Deputy Chief Justice Raymond Zondo said: "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."
It will, however, remain illegal to use cannabis in public, and to sell and supply it.
Parliament will have to decide how much cannabis people can keep
The Cannabis Development Council of South Africa welcomed the ruling, and called on the government to drop charges against people found in possession of the drug.
Jeremy Acton, the leader of the Dagga Party, which campaigns for the use of cannabis, said the ruling should have gone further to legalise the carrying of marijuana in public.
Cannabis is referred to as "dagga" in South Africa.
Court brushes aside opposition
By Andrew Harding, BBC News, Johannesburg
This judgement is a reminder that South Africa's hard-won constitution is among the most liberal in the world, backing individual rights, and in this case the right to grow and smoke your own marijuana in private, against the government's concerns about public health and public order.
The Constitutional Court's ruling focuses on the issue of privacy, and a person's right to do as they please in their own home.
The potential implications of the binding judgment are enormous, and unpredictable - particularly in terms of the criminal justice system, which routinely locks up thousands of overwhelmingly poor South Africans for using or dealing in small amounts of cannabis.
It is possible that the ruling, by allowing users to grow their own marijuana at home, could undermine the stranglehold of powerful drug gangs that blight so many communities. But the police, who argued against this change, will worry that the ruling will create more ambiguity and send the wrong signal to criminals.
The court has not approved - in any form - the trade in marijuana, meaning the government will not be able to profit from taxing a legalised industry.
In political terms, the landmark ruling emphasises the primacy of South Africa's constitution, which brushed aside the united opposition of numerous government ministries at a time when the authority and credibility of many of this young democracy's other institutions have been eroded by corruption and poor governance.
The court gave parliament 24 months to change the law to reflect its ruling.
Adults who used marijuana in private would be protected by the ruling until the law was amended.
The court did not specify the quantity of cannabis a person can grow or use in private.
Parliament would have to decide on this, it said.
In April Zimbabwe became the second country in Africa, after Lesotho, to legalise the use of marijuana for medical use.
Latest Stories
-
Samson’s Take: Arrogance of Power, Shameful Policing
5 hours -
Burnley score late to draw with Manchester United at Old Trafford
8 hours -
Bayer Leverkusen extend unbeaten run to 46 games after draw with Stuttgart
8 hours -
Chelsea come from two goals down to draw against Aston Villa
8 hours -
Andre Ayew scores in Le Havre’s 3-3 draw with PSG
8 hours -
GPL 2023/24: Kotoko draw with Medeama; Samartex go 7 points clear of Nations FC
8 hours -
Mahama cuts sod for construction of new multipurpose Jakpa palace in Damongo
8 hours -
NSS management assists Papao fire victims
9 hours -
EXPLAINER: Will dumsor end soon?
9 hours -
IMANI Africa takes on EC, accuses it of lying and publishing half truths
10 hours -
Manasseh Azure calls for investigation and prosecution of those responsible for GRA/SML contract
11 hours -
Kwesi Atuahene: Ghana’s health capital depends on HealthTech – Africa Center for Digital Transformation
11 hours -
13 signs your wife is planning on leaving you and you have no idea
11 hours -
IMANI Africa: Ghana’s EC’s dangerous and pathological conduct
11 hours -
If I speak there will be fire – Salah on Klopp row
12 hours