LONDON — The migration crisis in Europe is fanning old tensions in the Balkans, prompting a war of words in a region where bloody memories run deep.

After Croatia, under strain from an influx of migrants, closed its borders with Serbia and banned the entry of Serbian vehicles and citizens, the Serbian Foreign Ministry replied on Thursday with unusually harsh language, comparing the measures to those taken by Croatia’s Nazi puppet state during World War II.

Croatia blamed a computer glitch for the restrictions on Serbian citizens. But the Serbian Foreign Ministry was apparently unmoved, writing in a protest note to the Croatian Embassy in Belgrade that the actions against holders of Serbian travel documents were unprecedented “in the civilized world.”

“In their discriminatory character, they can only be compared with measures taken in the past, during the Fascist independent Croatia,” the letter said, invoking the racial policies of the Ustashe, the Fascist movement that ruled Croatia during World War II.