Supported by troops from the rulers of Sogdia, Shash, and Ferghana, the Türgesh attacked the Umayyad army in the pass, two days after they had left Kish (a Friday), at a distance of six farsakhs—c. 24 kilometres (15 miles)—from Samarkand. The Türgesh attacked while the Arab army had stopped to take a meal. The Arab vanguard, under Uthman ibn Abdallah ibn al-Shikhkhir, was overwhelmed, but Junayd was able to hurriedly deploy the main body of his army, placing his troops according to their tribal affiliations, with the Tamim and Azd on the right and the Rabi'ah on the left.