Battle of the Zab

The Battle of the Zab (), also referred to in scholarly contexts as Battle of the Great Zāb River, took place on January 25, 750, on the banks of the Great Zab River in what is now the modern country of Iraq. It spelled the end of the Umayyad Caliphate and the rise of the Abbasids, a dynasty that would last from 750 to 1258 which is divided in to two periods Early Abbasid period (750-940) and Later Abbasid period (940-1258).
Background.
In 747, a major rebellion broke out against the Umayyad Caliphate, which ruled most of the Middle East from 661 to 750. The principal cause of the rebellion was the increasing gap between the outlying peoples of the Caliphate and the Damascus-based Umayyad government. The Umayyad-appointed governors of the Caliphate's various provinces were corrupt and interested only with personal gains. Additionally, the Umayyads claimed no direct descent from Muhammad, while the Abbasids did (they descended from Muhammad's uncle Abbas—a fact the latter used greatly during the revolution).
The armies.
In 750, the army of the Umayyad caliph Marwan II fought a combined force of Abbasid, Shia, Khawarij, and Iraqi forces. Marwan's army was, on paper at least, far larger and more formidable than that of his opponents, as it contained many veterans of earlier Umayyad campaigns against the Byzantine Empire; its support for the caliph, however, was only lukewarm. The morale of the Umayyads had been damaged by the series of defeats inflicted earlier in the rebellion, while the morale of the Abbasid armies had increased.
The battle.
The Abbasid army formed a spear wall, a tactic they had adopted from their Umayyad opponents, presumably from witnessing it in earlier battles. This entailed standing in a battle line with their lances pointed at the enemy (similar to the stakes used by English longbowmen at Agincourt and Crécy many centuries later). The Umayyad cavalry charged, possibly believing that with their experience they could break the spear wall. This was a mistake on their part, however, and they were all but butchered. The Umayyad army fell into retreat, its morale finally shattered. Many were cut down by the zealous Abbasids or were drowned in the wintertime River Zab.
Aftermath.
Marwan II himself escaped the battlefield and fled down the Levant, pursued relentlessly by the Abbasids, who met no serious resistance from the Syrians because the land had recently been laid waste by an earthquake and pestilence. Marwan fled at last to Abusir/Busir, which is a small town on the Egyptian Nile delta. It was there, a few months after the battle, that he was at last killed in a short battle and replaced as caliph by Abu al-Abbas as-Saffah, bringing to an end Umayyad rule in the Middle East.