Ghana was the first of these empires, followed by the kingdoms of Mali and Songhai. Historians think the first people in Ghana were farmers along the Niger River. Sometime after AD 300 these farmers, the Soninké, were threatened by nomadic herders.