In the seventh century, as a result of the establishment of the first "themes" (military districts governed by a "strategos" with military and civilian authority) and the invasions of the Arabs and Slavs, the Praetorian Prefectures of the East and of Illyricum disappeared. The last certain attestation of a Praetorian Prefect of the East is in 629, while Illyricum survived to the end of the 7th century, but without any effective power since the majority of the Balkans, aside from Thessaloniki, had fallen under the Slavs. Thus the Prefect of Illyricum was renamed the Praetorian Prefect of Thessaloniki. In the same period, the dioceses of Dacia and Macedonia finally disappeared as a result of the loss of almost all their territory. However, the "Taktikon Uspenskij" which was written at the beginning of the 9th century, mentions a Praetorian Prefect of Constantinople and Proconsuls ("anthypatoi") of the themes, which suggests that the Praetorian Prefecture of the East continued to exist even though it had lost most of its earlier powers and had only a few judicial functions. If the dioceses lost their fiscal functions during the 6th and 7th centuries, it may be that they were replaced by new groupings of provinces under the judicial administration of a Proconsul ("anthypatos"). The provinces continued to exist under the "themes" until the second half of the 9th century.