Efforts by local kings to fight the invaders led to the formation of new political entities