 During the second civil war (680–692), after the death of Muʾawiya, the term acquired a new meaning of a ruler who would restore Islam to its perfect form and restore justice after oppression.In Kufa during the rebellion in 680s, Al-Mukhtar proclaimed Muhammad al-Hanafiyyah as the Mahdi in this heightened sense.Among the Umayyads, caliph Sulayman ibn Abd al-Malik encouraged the belief that he was the Mahdi, and other Umayyad rulers, like Umar II, have been addressed as such in the panegyrics of Jarir and al-Farazdaq.