Police had to seal off parts of Brussels, deploy water cannons and fire tear gas to disperse crowds following violence after the match.
Dozens of rioters overturned and torched cars, set electric scooters on fire and pelted cars with bricks. Police moved in after one person suffered facial injuries, said Brussels police spokeswoman Ilse Van de Keere.
Brussels mayor Philippe Close urged football fans to stay away from the city centre and said authorities were doing their utmost to keep order in the streets. Subway and tram traffic had to be interrupted on police orders.
“Those are not fans, they are rioters. Moroccan fans are there to celebrate,” Mr Close said. There were also disturbances in the city of Antwerp and Liege.
“Sad to see how a few individuals abuse a situation to run amok,” said Interior Minister Annelies Verlinden.
Morocco’s victory was a major upset at the World Cup and was enthusiastically celebrated by fans with Moroccan immigrant roots in many Belgian cities.
Police detained about a dozen people in Brussels and eight more in the northern city of Antwerp.
Two police officials were injured in the Dutch port city of Rotterdam.
Police in the neighbouring Netherlands said violence erupted in the port city of Rotterdam, with riot officers attempting to break up a group of 500 football supporters who pelted police with fireworks and glass. Media reported unrest in the capital Amsterdam and The Hague.
By late evening on Sunday, calm had returned to most of the cities involved.