Muhammad ibn Khalid ibn Barmak

Muhammad ibn Khalid ibn Barmak was one of the Barmakids, a family of Iranian functionaries who rose to great power under the Abbasid caliph Harun al-Rashid ((r. 786 – 809)).

Life
He was the brother of Yahya ibn Khalid, whose appointment as vizier by Caliph Harun al-Rashid in 786 began the family's twenty-year domination of the Abbasid Caliphate's public affairs. Muhammad served as the Caliph's chamberlain (hajib) from 788 to 795. He was replaced by al-Fadl ibn al-Rabi, who in the anecdotes of the time appears both as the Barmakids' foil and main antagonist at court.

Muhammad also served Harun al-Rashid as governor in the Yemen and the Jazira.

He was the only Barmakid to be spared during the family's abrupt fall in 803, likely because he had reported on the attempted flight of the Alid Yahya ibn Abdallah, who had been released by Yahya's son Ja'far, contrary to the Caliph's orders to have him killed.