Sunday’s “march of the Moroccan people” was organised by political and civil rights groups, as well as the families of detainees.
It comes weeks after a court upheld prison sentences for the activists, who held protests in 2016 and 2017.
Authorities accuse them of threatening the security of the country.
The demonstrations also called for the release of journalist Hamid El Mahdaoui, who is serving a three-year sentence for covering the protests in Morocco’s northern Rif region.
Why were they imprisoned?
In June 2018, a court sentenced Nasser Zefzaki, the leader of Hirak Rif, to 20 years in prison.
The same term was given to activists Ouassim El Boustati and Samir Ghid, while others were given sentences of up to 15 years.
The Hirak Rif organised protests in 2016 and 2017 after the death of a fishmonger in Al-Hoceima, a town in Rif.
Fishmonger Mohcine Fikri was crushed to death by a rubbish lorry whilst trying to recover his fish which had been confiscated by local police.
The incident prompted a wave of anger and thousands took to the streets, accusing authorities of corruption and an abuse of power.