In 838, in order to impress the Caliph of Baghdad, Theophilus had John the Grammarian distribute 36,000 "nomismata" to the citizens of Baghdad. In 839 or 840, he initiated diplomatic contact with the Umayyad Emirate of Córdoba. The name of his ambassador is somewhat garbled in the Arabic accounts of Ibn Hayyan, but it seems to have been the admiral Karteros. He was accompanied on his return by the Córdoban poet al-Ghazal, who signed a pact of friendship with Theophilos directed against the Abbasids.