What contributed to the fall of both Mali and Songhai?

A) competition from the Mediterranean states
B) devaluation of gold
C) invasion by the Moroccans
D) internal conflicts over succession