Al-Tabari reports that the first Arab advance into Khazar lands occurred as early as 642, claiming that Abd ar-Rahman ibn Rabiah reached Balanjar, without suffering any losses, and that his cavalry raided up to 200 parasangs—about —to the north of it, but both his dating and the improbable claim that the Arabs suffered no casualties have been disputed by modern scholars. Based at Derbent, Abd ar-Rahman led frequent raids against the Khazars over the following years, but these were small-scale affairs, and no event of major note is recorded in the sources. In 651/652, disregarding the instructions of the Caliph urging caution and restraint, Abd ar-Rahman led a strong army north, aiming to take Balanjar. The town was besieged for a few days, until the arrival of a Khazar relief force, coupled with a general sortie of the besieged forces, ended in a heavy defeat for the Arabs. Abd ar-Rahman (or, according to al-Baladhuri, Abd ar-Rahman's brother Salman) and 4,000 Muslim troops were left dead on the field. Three years later, the Khazars repelled a retaliatory campaign under Habib ibn Maslama. In the aftermath of these attacks, the Khazars abandoned Balanjar and moved their capital further north, in an attempt to evade the reach of the Arab armies.