The decision was announced late Monday after a government meeting on how to control the epidemic.
Morocco imposed a public health state of emergency on March 19, confining everyone to their homes except those with a permit to be out and about for their work.
Police, security agents and soldiers in armoured cars have been deployed around the country, erecting road barriers and control points.
The official number of COVID-19 cases in Morocco has doubled in a week to 1,120, including 80 fatalities.
Roger Mbassa Ndine, mayor of the Cameroonian coastal city of Douala, made a similar announcement on Monday as crews began distributing washable masks to citizens in a new awareness campaign.
Nemache Celestin, a Douala teacher, welcomes Ndine’s decision to make wearing a mask compulsory.
“Cameroon and Africa do not have enough resources to deal with this pandemic,” she said. “Everyone must do everything to protect us from the pandemic.”
In recent days, police in Cameroon began arresting people who ignored measures aimed at curtailing the spread of the coronavirus.
Despite government warnings, officials say a majority of Cameroonians are not taking the coronavirus seriously, and authorities are taking steps to enforce social distancing rules.