Although the exact origins of the Magyars are still debated, it seems certain that the Magyars left the region of Etelköz, between the lower reaches of the river Don and the Danube on the north shore of the Black Sea, in search of a new permanent homeland. First to shed light on this transition period for the Magyars from their original homeland and their arrival in the Carpathian Basin were the chroniclers of the Khazar Empire, mainly Arab and Persian travelers. In the middle of the tenth century, the Byzantine Emperor Constantine VII (Porphyrogenitus) wrote of the Magyars as follows: "They lived together with the Khazars for three years, and fought together with them in all their wars." The interpretation of "living together" is controversial, but it is apparent that the Magyars had a tribal alliance in the Khazar Empire.
The Khazars originated from the distant East, from the border areas of China. In the seventh century, they were swept by the Great Migrations to the mouth of the River Volga and the shores of the Caspian Sea. Here the Khazars conquered Onogur and Bulgar-Turkic tribes who spoke another Turkic dialect. In the seventh and eighth centuries, this new empire halted Arab expansionism, established contact with Byzantium, and became a decisive force between the Caspian Sea and the River Don up to the middle of the tenth century. Land cultivation, animal husbandry and handicrafts flourished in the empire. Merchants traded not only with Byzantium, but also with the Arab-Persian world and the distant East. The kagans did not prohibit the activities of Christian and Moslem missionaries. Both religions maintained places or worship and schools on Khazar land. Out of political considerations, however, the kagans and their retinues embraced a third great monotheist religion, Judaism. This was to avoid pressure on them from the Byzantine Empire and the various Arab emirates.
The peoples of the Khazar Khanate had a more advanced way of life than those of the Central Asian Turkic tribes, whose chief occupation was nomadic animal husbandry. The level of its agriculture and handicrafts industry matched contemporary European standards. In terms of commercial development it even exceeded them. However, the empire was a loosely organized entity, with the fluctuating numbers of subjugated peoples rather than fixed boundaries determining its size. The Magyar tribal alliance constituted one such subjugated people. The character of this alliance
The exact boundaries of Etelköz and neighboring Levedia cannot precisely be drawn. What is known about the region is that the still-powerful Khazar Empire lay immediately to their east, while Byzantium were the western and southern neighbors. In the north, where the steppes gave way to forest land, the Slav tribes were organizing themselves into states. Slav captives commanded good prices at the Byzantine slave markets, and this was perhaps one reason why the Khazars and the Magyars were inclined to levy tribute on the Slav settlers.
György Balázs, "The Magyars" Corvina Books Ltd. Budapest: 1989, pp.7-9.
The Magyars are mentioned in the earliest written records in the West as turci or ungri - Turks and Onogurs, the latter giving rise to their name in the main European languages. This is how a Byzantine account from 839 refers to the Magyars, which is the first written account of the Magyars. Since there were no great nomadic migrations in the steppe north of the Black Sea in the eighth and ninth centuries, it was probably not due to a result of external pressure but internal recovery of strength that the Magyars separated from the Khazar Khanate and obtained hegemony over the territory of Etelköz. It was from here that the Magyars launched their first raid against the East Frankish Empire in 862, which they later repeated several times on their own or allied with others, such as the Turkish Kabars and the Moravian Prince Svatopluk. In 894, they were the allies of the Byzantine Emperor Leo the Wise in a successful campaign against the Bulgarian Tsar Simeon.
In the same year, however, the relative tranquility of the steppe came to an end, with profound consequences for the Magyars. A massive influx of further Turkish peoples from the east compelled the Pechenegs, who had lived between the Urals and the Volga and are supposed to have already waged two 'wars' against the Magyars after the 850s, to cross the Don. Urged by a double motivation, the Pechenegs fell upon the Magyars who, wedged between two hostile forces, immediately looked for a new home further west.
László Kontler, "Millennium in Central Europe: A History of Hungary" Atlantisz Publishing House, Budapest: 1999, pp.38-39.