It definitely was the race. In Afghanistan, religion has always been used as a weapon. It has been weaponized to mobilize people. But the purpose has always been racial. This race and ethnicity conflict has been the key foundation for all of the wars in that country.
Some of the issues you mentioned have been used against the Hazaras, that they are Mongols, that they are not from this country. That is not entirely correct. Hazaras are mostly a Turkic people. Central Asia is a collection of Turkic people, with some Persians and some Arabs even.
Race has been the driving force behind the violence, but with religion for mobilization.