 These historical ties with the empire were weakened in the later 6th century, with the loss of much of the western possessions of the empire under Justin II and the waning power projection by the empire, weakened by its wars with the Persians and the Arab invasion.As a result, the "barbarian kingdoms" by the 7th to 8th centuries developed the system of feudalism characteristic of the European Middle Ages.The title of "emperor" was revived in the west by Charlemagne in AD 800.