At the beginning of the eleventh century the Byzantine empire was at the height of its glory. The emperor Basil II, who died in 1025 after a reign of nearly fifty years, completed and consolidated the work of the two great soldier emperors before him, and deserves to rank with Justinian and Heraclius as among the greatest of all the rulers of Byzantium. In the East the Arabs had been beaten back and humiliated; on the North the Bulgars were savagely defeated by Basil himself and their territory reduced to a province of the empire; Armenia and parts of the Caucasus were conquered; and the Mediterranean was cleared of pirates and policed by the Byzantine fleet. The internal security of the empire seemed unshakable, its riches inexhaustible, and its prestige extended far beyond its boundaries. It was in 989, in the reign of Basil II, that the largest of the Slav states came within the Byzantine sphere of influence, when Vladimir of Kiev married the emperor's own sister and was converted to Orthodox Christianity and Byzantine culture. At the beginning of the eleventh century the Byzantines were justly proud of themselves, of their empire, its civilisation, stability and prosperity, and equally of their Church. They were more convinced than they had ever been of the truth, cherished since the days of Constantine, that the Roman empire was God's plan for the order of the world, or, as Eusebius had said, the terrestrial image of the Kingdom of Heaven, and that its ruler, the one true emperor in the ‘Queen of Cities’, was divinely ordained as God's regent on earth.