Emergency personnel carry an injured supporter at the Mohammed V Stadium in Casablanca following clashes between rival fans of Raja de Casablanca after their match against Chabab Rif Al Hoceima on March 19, 2016 (AFP Photo/)

Rabat (AFP) - Two people were killed and 54 injured in Morocco's largest city on Saturday when rival fans of its Raja de Casablanca football club brawled after a home game.

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.

Following the violence, the Moroccan football federation's disciplinary commission penalised Raja by forcing them to play their next five matches in the tournament behind closed doors.

They were also fined 100,000 dirhams (9,000 euros) and could face compensation claims following the damage to the stadium.

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.