Fearing what the citizens would do to rid themselves of his force if he chose to remain within Rayy's walls and defend against a siege, Tahir led his army along the road towards Baghdad until the intruders were in sight. After an uneasy night, Ali's force made an initial charge, which was followed by a brief truce and unsuccessful
negotiations, in which Tahir's envoy reminded Ali of the solemn agreements al-Amin had torn up. Then the main
battle began, with a lightning attack force of 700
Khwarazmians, backed by archers, sent to smash the centre of Ali's army, and if possible destroy its command structure. This approach was very effective, swiftly resulting in the death of Ali. How he died is not perfectly clear; one version has it that he was a victim of an arrow-storm sent by Tahir's
Bukharan archers ahead of the attack. Another version claims that he was felled from his horse by a soldier named Dawud Siyah ("Black David")- again possibly with an arrow- but not killed. Tahir ibn al-Taji (not related to the commander Tahir) then approached him and asked if he was really Ali ibn Isa, following which he killed him in single combat. In either case, when he was killed his army scattered in all directions. According to
Hugh N. Kennedy; :
"The Battle of Rayy marked the turning point in the military tactics of the Period.The large infantry army was defeated by a smaller cavalry force. This may have marked the end of the large armies of foot soldiers which were typical of the much earlier Islamic warfare and the superiority of the smaller groups of mounted men, either armored spearmen or mounted archers." ==Aftermath==