The running battles, in which fans threw flares and ripped up parts of the Mohammed V stadium, came despite a 2-1 victory for the home team over Chabab Rif Al Hoceima of Al Hoceima in northern Morocco.
Footage on Moroccan media showed the fans — dressed in the club’s green colours — charging at each other. It was unclear how the clashes had erupted.
The country’s DGSN security service said in a statement that 31 people were arrested after the match for involvement in “acts of vandalism”. Ten people had been arrested prior to the game for the same reason, it said.
Prosecutors have opened an inquiry into the fan trouble.
Rival supporters often clash during Moroccan football matches.
A year ago a man died in the central city of Khouribga during clashes between supporters of the local club and of Raja de Casablanca. In 2013 more than 200 people were arrested after clashes broke out in Casablanca between fans of Raja and FAR Rabat.