The prohibition of dagga in South Africa in the late 1800s was racist and irrational according to historian Craig Paterson.
Paterson was testifying in the dagga trial on Monday at the North Gauteng High Court.
He said he had concluded that dagga was banned because it was mostly blacks and Indians who smoked it at the time.
He said the history of the prohibition of cannabis did not find ground in rationality, reason, science or good law making but rather in racism, irrationality, social Darwinism, poor politics and non-science.
Paterson said historical evidence showed that alcohol led to far more arrests and prosecutions than cannabis.
According to Paterson, a South African Indian immigrant commission report in 1887 paved the future for debates around cannabis in the country.
The focus of the report was based largely on labourer indolence.
"The inference is that insanity wasn't the main concern, but rather it was labour," said Paterson.
Prohibition was called for in the 1870s and in 1949 the National Party requested a special commission into cannabis.
He said the commission retained the argument of moral degradation which showed its tacit acceptance of racial hierarchy and racism.
He also referred to this as the use of social Darwinism.
During cross examination the State said it would discredit Paterson as an expert and added that the entire history mentioned in his testimony was irrelevant.
Outside court a large group of anti-cannabis protesters sang songs and held up signs saying "cannabis caused users to go crazy".
Protesters wore Gauteng Social Development T-shirts.
Gauteng Social Development MEC Nandi Mayathula-Khoza said she supported the picket against the legalisation, use and possession of cannabis.
"We will continue to mobilise Local Drug Action Committees, NPOs, Recovering Service Users, families, Faith Based Organisations, NPOs and as many people of Gauteng as possible to participate," said Mayathula-Khoza in a statement.
"Dagga is a serious problem in our communities and it is a gateway to more harmful drugs. Dagga addiction causes misery in communities and the negative effects are long lasting. The mental institutions are full to the brim with service users suffering from substance induced psychosis."
The trial is expected to resume on Wednesday.