 Before 881 AD three Turkic tribes rebelled against the rule of the Khagan of the Khazars, but they were suppressed.After their defeat they left the Khazar Empire and voluntarily joined the "Hétmagyar" confederation.The three tribes were organised into one tribe, called Kabar, and later they played the roles of vanguard and rear guard during the joint military actions of the confederation.