A pious man, he emulated his father and grandfather in not meddling with the power struggles for the Caliphate, and unlike many Alids he acquiesced to the Abbasids' seizure of power after the Abbasid Revolution. The first Abbasid Caliph, al-Saffah, married his daughter, and allowed Hasan to live at the court. In 767, al-Saffah's successor al-Mansur appointed Hasan as governor of the holy city of Medina, but dismissed him in 772 after the two fell out, and confiscated his wealth.