The Umayyad army, under Muslim ibn Sa'id al-Kilabi, was campaigning in the Ferghana Valley when it learned of the Türgesh advance. Immediately, the Arabs began a hasty retreat to the Jaxartes, pursued and harassed by the Türgesh cavalry. Finally, after 11 days, the Umayyad army reached the Jaxartes, where it was caught between the Türgesh and the forces of the native Transoxianian principalities.