The fifth Abbasid caliph (786–809). Under him Baghdad reached its greatest brilliance, partly thanks to the ability of the Persian viziers of the house of Barmak (until their fall in 803). He was a competent commander and a patron of learning and the arts. His court and capital provided the setting for many of the stories in the Thousand and One Nights. His division of the empire among his heirs led to conflict after his death (809–18). According to French chronicles, there was an exchange of embassies between Harun and Charlemagne.