In the meantime, the semi-nomadic Magyar tribes, possibly having suffered defeat from the similarly nomadic Pechenegs, left their territories east of the Carpathian Mountains, invaded the Carpathian Basin and started to occupy the territory gradually around 896. Their armies' advance may have been promoted by continuous wars among the countries of the region whose rulers still hired them occasionally to intervene in their struggles.