Europeans believed Africans to be a sub species. Centuries were spent justifying chattel slavery on racial grounds. “Scientific racism”. To deny it was racial is a historical revisionism.
Tribes would sell people in exchange for guns. It was white Europeans who created that market though.