Khalid ibn Barmak

Khalid ibn Barmak (; –781/82) was the first prominent member of the Barmakid family, which converted to Islam and became prominent members of the Abbasid court in the second half of the 8th century. Khalid himself was converted to Islam at the Umayyad court in the 720s, but joined the nascent Abbasid revolutionary movement in Khurasan, and played a significant role in the Abbasid Revolution that toppled the Umayyads. He enjoyed close relations with the first Abbasid caliph, al-Saffah, functioning as his chief minister and introducing innovations in record-keeping. Under al-Saffah's successor, al-Mansur, his influence decreased, but he still occupied significant provincial governorships in Fars, Tabaristan, and Mosul. As an administrator, he repeatedly distinguished himself for his fairness, especially in matters of taxation, and was a popular governor. He appears to have briefly fallen into disgrace around 775, but he managed to recover, helped by the rapid rise of his son, Yahya. His ties to the Abbasid dynasty were soon strengthened when his grandson, al-Fadl ibn Yahya, became the foster-brother of the future Harun al-Rashid, while Yahya became the prince's tutor. Khalid died in 781/2, shortly after returning from an expedition against the Byzantine Empire.
Origin.
The Barmakid family hailed from Balkh, the capital of Tokharistan in Khurasan. The people of Tokharistan had a distinct identity: ruled by Hephthalite and later Turkic dynasties, they spoke the eastern Iranian Bactrian language, and were mostly Buddhist. The Barmakids hailed from the family of guardians of the great and extremely wealthy Buddhist monastery, the "Nawbahār", which controlled most of the Balkh oasis, and may have been the "de facto" rulers of the area. These guardians were known by a title that was rendered into Arabic as . Modern scholars consider that it originated from Sanskrit, either from "pramukha" ("chief") or from "paramaka" ("supreme"). Historical traditions that assign the Barmakids a Zoroastrian origin, and even make them descendants of the chief ministers of the Sassanid dynasty, are later fabrications invented during the family's zenith.
Tokharistan was attacked by the Muslims during their eastern expansion as early as about 663/4, but was not definitely conquered until the reign of the Umayyad caliph Hisham ibn Abd al-Malik (). Balkh was occupied and garrisoned in 725, and the "Nawbahār" abandoned, though its structure remained in place for three more centuries. The incumbent Barmak was brought with his son to the Umayyad court, where both converted to Islam; the Barmak's son adopted the name Khalid ibn Barmak, and became a of the Banu Khuza'a tribe, while his two brothers received the names Sulayman and al-Hasan. He probably had another brother, Abu Ubayd Mu'awiya, who is mentioned as living in Baghdad in later years.
During his stay in the Umayyad court, Khalid is known to have befriended the Caliph's son, Maslama ibn Hisham, a notable military commander, and to have become fluent in Arabic. 
Career under the Abbasids.
Abbasid Revolution.
Soon after, both Barmak and Khalid returned to Khurasan. Barmak disappears from the record after 725/6, but it is implied that he was responsible for Khalid's joining in the early Abbasid missionary activity () in Khurasan. Khalid had joined the Abbasid cause by 742, and, as one of the few non-Arabs, was appointed one of the twenty , the second tier of the inner leadership. During the Abbasid Revolution, he played an active role, gathering funds from Shi'a sympathizers, leading troops in the field, and being entrusted by the Abbasid commander Qahtaba ibn Shabib al-Ta'i with distributing the plunder to his army. According to the 10th-century historian al-Jahshiyari, Khalid was placed in charge of redistributing the land tax () of Khurasan by Abu Muslim, and did so with such fairness that he earned the gratitude of the Khurasanis.
Under al-Saffah.
After the establishment of the Abbasid Caliphate, he was placed in charge of the fiscal departments of the land tax () and of the army () for the duration of the caliphate of al-Saffah (). Shortly after he reportedly he assumed the supervision of all fiscal departments, thus becoming a kind of vizier, although he did not hold the title. He is credited with introducing the practice of keeping records in codices, rather than loose sheets as was the custom until then.
Khalid apparently benefited from a substantial education, and some previous administrative experience, although the origin of the latter is unknown; he may have acquired it at the Umayyad court, or alongside his father at Balkh. His relationship with the Caliph was very close: his daughter was suckled by the Caliph's wife, while in turn his own wife was made the foster-mother to al-Saffah's daughter, Raytah.
Under al-Mansur.
He remained head of the land tax department for at least a year into the reign of al-Mansur (), but court intrigues instigated by the vizier Abu Ayyub al-Muryani meant that he was soon relegated to the provincial government of Fars, which he headed for about two years. At some point he returned to the court—now in the new capital, Baghdad—where according to a well-known, but likely fabricated, he persuaded the Caliph to not destroy the Sassanid-era Taq Kasra at Ctesiphon, arguing that its ruined state was a testament to the superiority of Islam. In 764/65, he was involved in the intrigues that resulted in Isa ibn Musa's renunciation of succession to the caliphate. 
He then spent about seven years as governor of Tabaristan; coins with his name, in the Arab–Sassanid style, are known from 766/67–772. Succeeding the tyrannical Rawh ibn Hatim, his tenure was successful: he maintained friendly relations with the local autonomous ruler, Wandad Hurmuzd, captured the fortress of Ustunavand near Damavand, founded the town of al-Mansura, and was well liked by the local inhabitants. However, his attempts to spread Islam were quickly undone after his departure, and the settlements he founded were destroyed by the Bavandid ruler Sharwin I. Around the same time, his grandson, al-Fadl ibn Yahya, was made foster-brother of one of the sons of Caliph al-Mahdi (), the future Harun al-Rashid ().
In 775, shortly before al-Mansur died, Khalid fell out of favour for some unknown reason, and was obliged to pay a heavy fine of three million dirhams, within a short notice. He was saved only by his network of friends at court, who were visited by his son, Yahya ibn Khalid, and surreptitiously forwarded him the necessary sums. But following Kurdish uprisings in Mosul, Khalid was pardoned and appointed governor of the city. His restoration to favour probably was also the result of the rapidly rising fortunes of Yahya, who was by then one of the chief figures of the Abbasid government.
Under al-Mahdi.
When al-Mahdi came to the throne, he was appointed again to govern Fars, where he distinguished himself for redistributing the land tax and abolishing an onerous tax on orchards. Around 778, Yahya was appointed as tutor to the prince Harun. In 780, Khalid and his son Yahya distinguished themselves at the siege of the Byzantine fortress Samalu, an expedition which was led by Harun under the auspices of Yahya. He died shortly after, in 781/82, at about 75 years of age. Of his sons, Yahya became an all-powerful vizier under Harun al-Rashid, while Muhammad became Harun al-Rashid's chamberlain and served as a provincial governor. Likewise, Yahya's sons enjoyed high offices, until the abrupt fall of the family in 803.