 According to a memorial stone erected in or before 831 , a Bulgarian military commander named <unk> drowned in the Dnieper during a military campaign . Florin Curta says this inscription may be the " ' first clue ' to the upheaval on the steppes created by the migration of the Magyars into the lands between the Dnieper and the Danube " . The earliest certainly identifiable events of the Magyars ' history occurred in the 830s . The Bulgarians hired them to fight against their Byzantine prisoners , who rebelled and tried to return to Macedonia in the late 830s , but the Byzantines routed them on the banks on the Lower Danube . According to the Annals of St. Bertin , Rus ' envoys who visited Constantinople in 839 could only return to their homeland through the Carolingian Empire because " the route by which they had reached Constantinople had taken them through primitive tribes that were very fierce and savage " ; Curta and Kristó identify those tribes with the Magyars . Ibn Rusta wrote that the Khazars " used to be protected from attack by the Magyars and other neighboring peoples " by a ditch . According to a scholarly theory , Ibn Rusta 's report shows that the Khazar fort at Sarkel , which was built in the 830s , was one of the forts protecting the Khazars against the Magyars . 
