 The Samanid emir , Isma 'il ibn Ahmad , launched an expedition against the Oghuz Turks in 893 , forcing them to invade the Pechenegs ' lands between the Volga and Ural rivers . After being expelled from their homeland , the Pechenegs departed for the west in search of new pastures . The Magyars had in the meantime invaded Bulgaria in alliance with the Byzantine Emperor Leo the Wise . Simeon I of Bulgaria sent envoys to the Pechenegs and persuaded them to storm into Etelköz . The unexpected invasion destroyed the unguarded dwelling places of the Magyars , forcing them to leave the Pontic steppes and seek refuge over the Carpathian Mountains . The Magyars occupied their new homeland in several phases , initially settling the lands east of the Danube and only invading the March of Pannonia after Arnulf of East Francia died in 899 . They destroyed Moravia before 906 and consolidated their control of the Carpathian Basin through their victory over a Bavarian army in the Battle of Brezalauspurc in 907 . 
