In the meantime, the Hungarian tribes, having suffered a defeat from the nomadic Pechenegs, left their territories east of the Carpathian Mountains, invaded the Pannonian 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.