The Umayyad dynasty had been ruling since winning the Battle of Karbala, where they defeated the last of Mohammed’s grandsons. They were of the same tribe as Mohammed, but not from his clan or family. Arabic extended families appear to keep close track of genealogy; a century after Mohammed, there were family members waiting to take back power.
The Abbasid family claimed descent from Abbas, one of Mohammed’s uncles. They had been agitating for power since around the time that Muslim armies entered Europe, but the Umayyad caliphs had been too powerful, too surrounded by loyalists, for them to succeed. Relatives of Mohammed generally claimed the title Imam, leader. (Although the true Shi’ia continued to count their own secret Imams descended from one survivor of the Battle of Karbala, they also supported the Abbasids.) Imam Ibrahim was captured as a rebel in 747 and probably died in prison. His death set off the overthrow of the Umayyads.
The Abbasids appealed to whoever was disaffected: non-Arabs (especially Persians) who felt like 2nd class citizens; Shi’ites; Yemeni and Bedouin Arabs who believed Damacus had grown too soft–and who were no longer getting as many of the perks they felt they were owed. In a battle on one of the tributaries of the Tigris River, a combined rebellion of Persians, Shi’ites and Abbasid true believers defeated Marwan II, the last Umayyad to rule in Damascus.
In exchange for Persian support, the first Abbasid caliphs moved the capital into Persia. Al-Mansur, the second Caliph, personally chose a building site on the Tigris and consulted astrologers to find out the most auspicious time to start building Baghdad. From this time until the Seljuk Turks took over the Muslim Empire, rule became increasingly Persian, not Arab. Arabs still ruled in name, but the bureaucracy was all Persian, and so was the style.