On the next day, despite suffering from thirst and being hemmed in between the Türgesh on their rear and the Transoxianian forces in front, the desperate Arabs managed to break through the enemy lines and cross the Jaxartes. As al-Tabari writes, when they reached the relative safety of Khujand, "suffering from hunger and exhaustion, the troops spread out in disorder". There, the leadership of the army was formally transferred to Abd al-Rahman ibn Na'im al-Ghamidi, who led the remnants of the army back to Samarkand.[14][15][16]