In early Islam the color black was associated not just with mourning but also with revenge for a wrongful death According to the historian Ibn Khaldun the opponents of the Umayyads adopted black as their color to avenge the Umayyads persecution of the prophet s family Black flags were also flown by the prophet in his war with the infidels Do not flee with the flag from the infidels and do not fight with it against the Muslims Mohammed reportedly told one of his generals 