Napoli's Kalidou Koulibaly was racially abused by Inter Milan supporters.
Inter Milan will play their next two home matches without fans and a third game with a portion of the stadium closed as punishment for their fans racially abusing a Napoli player, the latest incident of racism to blight football in Italy.
The league judge's ruling came a day after Kalidou Koulibaly was targeted by Inter supporters who directed monkey noises at him throughout the Seria A match at Milan's San Siro Stadium.
Napoli coach Carlo Ancelotti said he made three appeals for the match to be stopped but his requests were ignored.
Koulibaly, a French-born Senegal defender, was eventually sent off in the game that Napoli lost 1-0.
"I think that the Koulibaly red car was due to a very particular state of mind he was in. He had been insulted during the whole match," Ancelotti told a post-match press conference.
"We asked the federation to do something about it but they just made some announcements and the match was not suspended like we have demanded."
Ancelotti also threatened to lead his team off the field the next time one of his players was subjected to continued racist abuse.
Giuseppe Sala, the mayor of Milan, apologised to Koulibaly, calling the abuse a "shameful act against a respected athlete".
Italy, as well as other European countries, has struggled to combat racism and stamp out racist chants during matches.