The barbarian kingdoms, also known as the post-Roman kingdoms, the western kingdoms, or the early medieval kingdoms, were the states founded by various non-Roman, primarily Germanic, peoples in Western Europe and North Africa following the collapse of the Western Roman Empire in the fifth century. The formation of the barbarian kingdoms was a complicated, gradual and largely unintentional process, as the Roman state failed to handle barbarian migrants on the imperial borders, leading to both invasions and invitations into imperial territory, but simultaneously denied barbarians the ability to properly integrate into the imperial framework. The influence of barbarian rulers, at first local warlords and client kings without firm connections to any territories, increased as Roman emperors and usurpers used them as pawns in civil wars. It was only after the collapse of effective Western Roman central authority that the barbarian realms transitioned into proper territorial kingdoms.